From 942cdd8bc46a6186a53077de4d173a00968dca3d Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Tue, 15 Dec 2015 12:07:24 +0300 Subject: [PATCH] Fix list dividers and configure map/waypoints screens in landscape mode --- .../osmand/plus/dashboard/DashboardOnMap.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java index f858c59b69..2e714d1b05 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java @@ -523,13 +523,21 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks { private void applyDayNightMode() { if (nightMode) { - listBackgroundView.setBackgroundColor(mapActivity.getResources().getColor(R.color.bg_color_dark)); - Drawable d = new ColorDrawable(mapActivity.getResources().getColor(R.color.dashboard_divider_light)); + if (listBackgroundView != null) { + listBackgroundView.setBackgroundColor(mapActivity.getResources().getColor(R.color.bg_color_dark)); + } else { + listView.setBackgroundColor(mapActivity.getResources().getColor(R.color.bg_color_dark)); + } + Drawable d = new ColorDrawable(mapActivity.getResources().getColor(R.color.dashboard_divider_dark)); listView.setDivider(d); listView.setDividerHeight(dpToPx(1f)); } else { - listBackgroundView.setBackgroundColor(mapActivity.getResources().getColor(R.color.bg_color_light)); - Drawable d = new ColorDrawable(mapActivity.getResources().getColor(R.color.dashboard_divider_dark)); + if (listBackgroundView != null) { + listBackgroundView.setBackgroundColor(mapActivity.getResources().getColor(R.color.bg_color_light)); + } else { + listView.setBackgroundColor(mapActivity.getResources().getColor(R.color.bg_color_light)); + } + Drawable d = new ColorDrawable(mapActivity.getResources().getColor(R.color.dashboard_divider_light)); listView.setDivider(d); listView.setDividerHeight(dpToPx(1f)); }