diff --git a/OsmAnd/res/layout/bottom_sheet_menu_base.xml b/OsmAnd/res/layout/bottom_sheet_menu_base.xml index cb4716cf00..4d62622dd6 100644 --- a/OsmAnd/res/layout/bottom_sheet_menu_base.xml +++ b/OsmAnd/res/layout/bottom_sheet_menu_base.xml @@ -8,7 +8,8 @@ + android:layout_height="0dp" + android:layout_weight="1"> contentHeight) { - scrollView.getLayoutParams().height = contentHeight; + if (contentHeightPrevious != contentHeight && activity != null) { + if (viewHeight + shadowHeight < contentHeight) { + AndroidUtils.setBackground(getView(), getPortraitBg(activity)); } else { - scrollView.getLayoutParams().height = ViewGroup.LayoutParams.WRAP_CONTENT; + AndroidUtils.setBackground(getView(), getColoredBg(activity)); } scrollView.requestLayout(); - int delay = Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP ? 300 : 1000; - scrollView.postDelayed(new Runnable() { - public void run() { - scrollView.scrollTo(0, scrollView.getHeight()); - } - }, delay); - contentHeightPrevious = contentHeight; } } };