Fix list dividers and configure map/waypoints screens in landscape mode

This commit is contained in:
Alexey Kulish 2015-12-15 12:07:24 +03:00
parent 1e2d454a21
commit 942cdd8bc4

View file

@ -523,13 +523,21 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks {
private void applyDayNightMode() { private void applyDayNightMode() {
if (nightMode) { if (nightMode) {
listBackgroundView.setBackgroundColor(mapActivity.getResources().getColor(R.color.bg_color_dark)); if (listBackgroundView != null) {
Drawable d = new ColorDrawable(mapActivity.getResources().getColor(R.color.dashboard_divider_light)); 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.setDivider(d);
listView.setDividerHeight(dpToPx(1f)); listView.setDividerHeight(dpToPx(1f));
} else { } else {
listBackgroundView.setBackgroundColor(mapActivity.getResources().getColor(R.color.bg_color_light)); if (listBackgroundView != null) {
Drawable d = new ColorDrawable(mapActivity.getResources().getColor(R.color.dashboard_divider_dark)); 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.setDivider(d);
listView.setDividerHeight(dpToPx(1f)); listView.setDividerHeight(dpToPx(1f));
} }