Skip to content

Commit 01a232d

Browse files
committed
fix: widen menu to prevent clipping of version and labels
- Set minimum width of 280dp on menu layout - Increase camera button padding for larger touch targets
1 parent c2c7266 commit 01a232d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎android/app/src/main/java/com/openipc/decoder/Decoder.java‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -646,14 +646,15 @@ private void createMenu(View menu) {
646646
mMenuPopup = popup;
647647
popup.setOnDismissListener(() -> mMenuPopup = null);
648648

649-
// camRow must be WRAP_CONTENT to anchor the popup width to all 8 buttons;
650-
// other menu items use default MATCH_PARENT to stretch and align uniformly
649+
// camRow sets the natural width; layout has a minimum width so that
650+
// version string and transport label fit without clipping
651651
LinearLayout camRow = new LinearLayout(this);
652652
camRow.setOrientation(LinearLayout.HORIZONTAL);
653653
LinearLayout.LayoutParams wrapParams = new LinearLayout.LayoutParams(
654654
LinearLayout.LayoutParams.WRAP_CONTENT,
655655
LinearLayout.LayoutParams.WRAP_CONTENT);
656656
layout.addView(camRow, wrapParams);
657+
layout.setMinimumWidth(dp(280));
657658

658659
LinearLayout header = new LinearLayout(this);
659660
header.setOrientation(LinearLayout.VERTICAL);
@@ -688,7 +689,7 @@ private void createMenu(View menu) {
688689
final int slot = i;
689690
camButtons[i] = createItem(String.valueOf(i + 1));
690691
camButtons[i].setGravity(Gravity.CENTER);
691-
camButtons[i].setPadding(dp(4), dp(4), dp(4), dp(4));
692+
camButtons[i].setPadding(dp(12), dp(8), dp(12), dp(8));
692693
camRow.addView(camButtons[i], new LinearLayout.LayoutParams(
693694
LinearLayout.LayoutParams.WRAP_CONTENT,
694695
LinearLayout.LayoutParams.WRAP_CONTENT));

0 commit comments

Comments
 (0)