Skip to content

Commit b337e89

Browse files
committed
fix: use fixed menu width so URL field displays fully
- set popup width to 50% of screen - make URL EditText single-line with horizontal scroll
1 parent 3328120 commit b337e89

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,8 @@ private void createMenu(View menu) {
356356
LinearLayout layout = new LinearLayout(this);
357357
layout.setOrientation(LinearLayout.VERTICAL);
358358

359-
PopupWindow popup = new PopupWindow(layout, LinearLayout.LayoutParams.WRAP_CONTENT,
359+
int menuWidth = (int) (getResources().getDisplayMetrics().widthPixels * 0.5);
360+
PopupWindow popup = new PopupWindow(layout, menuWidth,
360361
LinearLayout.LayoutParams.WRAP_CONTENT, true);
361362
popup.showAtLocation(menu, Gravity.TOP | Gravity.START, 0, 0);
362363

@@ -485,6 +486,7 @@ private EditText createEdit(String title) {
485486
text.setTextColor(Color.WHITE);
486487
text.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);
487488
text.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_URI);
489+
text.setSingleLine(true);
488490
text.setImeOptions(EditorInfo.IME_ACTION_DONE);
489491
text.setSelection(text.getText().length());
490492
focusChange(text);

0 commit comments

Comments
 (0)