diff --git a/OsmAnd/res/layout/fragment_wikivoyage_show_images_first_time.xml b/OsmAnd/res/layout/fragment_wikivoyage_show_images_first_time.xml index 4ac4bd3dc9..a281bd25fb 100644 --- a/OsmAnd/res/layout/fragment_wikivoyage_show_images_first_time.xml +++ b/OsmAnd/res/layout/fragment_wikivoyage_show_images_first_time.xml @@ -4,7 +4,6 @@ xmlns:tools="http://schemas.android.com/tools" xmlns:osmand="http://schemas.android.com/apk/res-auto" android:layout_gravity="bottom" - android:background="?attr/bottom_menu_view_bg" android:orientation="vertical"> = AndroidUtils.dpToPx(activity, 8); + if (AndroidUiHelper.isOrientationPortrait(activity)) { + mainView.setBackgroundResource(showTopShadow ? getPortraitBgResId() : getBgColorId()); + } else { + mainView.setBackgroundResource(showTopShadow ? getLandscapeTopsidesBgResId() : getLandscapeSidesBgResId()); + } + ViewTreeObserver obs = mainView.getViewTreeObserver(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { obs.removeOnGlobalLayoutListener(this); @@ -123,4 +135,24 @@ public class WikivoyageShowPicturesDialogFragment extends BottomSheetDialogFragm }); } } + + @DrawableRes + protected int getPortraitBgResId() { + return nightMode ? R.drawable.bg_bottom_menu_dark : R.drawable.bg_bottom_menu_light; + } + + @DrawableRes + protected int getLandscapeTopsidesBgResId() { + return nightMode ? R.drawable.bg_bottom_sheet_topsides_landscape_dark : R.drawable.bg_bottom_sheet_topsides_landscape_light; + } + + @DrawableRes + protected int getLandscapeSidesBgResId() { + return nightMode ? R.drawable.bg_bottom_sheet_sides_landscape_dark : R.drawable.bg_bottom_sheet_sides_landscape_light; + } + + @ColorRes + protected int getBgColorId() { + return nightMode ? R.color.bg_color_dark : R.color.bg_color_light; + } }