diff --git a/OsmAnd-telegram/res/values/dimens.xml b/OsmAnd-telegram/res/values/dimens.xml index 383a046ead..b10d20db9d 100644 --- a/OsmAnd-telegram/res/values/dimens.xml +++ b/OsmAnd-telegram/res/values/dimens.xml @@ -64,6 +64,8 @@ -0.03 300dp + + 300dp diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/SettingsDialogFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/SettingsDialogFragment.kt index 476e99ae57..98996fbadf 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/SettingsDialogFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/SettingsDialogFragment.kt @@ -141,6 +141,7 @@ class SettingsDialogFragment : BaseDialogFragment() { isModal = true anchorView = valueView setContentWidth(AndroidUtils.getPopupMenuWidth(ctx, menuList)) + height = AndroidUtils.getPopupMenuHeight(ctx) setDropDownGravity(Gravity.END or Gravity.TOP) setAdapter(ArrayAdapter(ctx, R.layout.popup_list_text_item, menuList)) setOnItemClickListener { _, _, position, _ -> diff --git a/OsmAnd-telegram/src/net/osmand/telegram/utils/AndroidUtils.kt b/OsmAnd-telegram/src/net/osmand/telegram/utils/AndroidUtils.kt index b7ccf92ba0..e2f26018bf 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/utils/AndroidUtils.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/utils/AndroidUtils.kt @@ -116,6 +116,10 @@ object AndroidUtils { return 0 } + fun getPopupMenuHeight(ctx: Context): Int { + return ctx.resources.getDimensionPixelSize(R.dimen.list_popup_window_height) + } + @ColorInt fun getAttrColor(ctx: Context, @AttrRes attrId: Int, @ColorInt defaultColor: Int = 0): Int { val ta = ctx.theme.obtainStyledAttributes(intArrayOf(attrId))