colors refactoring

This commit is contained in:
Nazar 2019-07-27 15:05:53 +03:00
parent 5a205e2ca5
commit c3d9b46573
2 changed files with 5 additions and 6 deletions

View file

@ -1,5 +1,6 @@
package net.osmand.plus.activities; package net.osmand.plus.activities;
import net.osmand.AndroidUtils;
import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R; import net.osmand.plus.R;
import android.app.ActionBar; import android.app.ActionBar;
@ -33,7 +34,7 @@ public abstract class OsmandListActivity extends
: R.color.list_background_color_dark)); : R.color.list_background_color_dark));
getListView().setDivider(getMyApplication().getUIUtilities().getIcon(R.drawable.divider_solid, getListView().setDivider(getMyApplication().getUIUtilities().getIcon(R.drawable.divider_solid,
getMyApplication().getSettings().isLightContent() ? R.color.divider_color_light : R.color.divider_color_dark)); getMyApplication().getSettings().isLightContent() ? R.color.divider_color_light : R.color.divider_color_dark));
getListView().setDividerHeight(1); getListView().setDividerHeight(AndroidUtils.dpToPx(getMyApplication(), 1));
} }

View file

@ -171,11 +171,9 @@ public class MapMarkersDialogFragment extends android.support.v4.app.DialogFragm
TextView toolbarTitle = mainView.findViewById(R.id.map_markers_toolbar_title); TextView toolbarTitle = mainView.findViewById(R.id.map_markers_toolbar_title);
bottomNav = mainView.findViewById(R.id.map_markers_bottom_navigation); bottomNav = mainView.findViewById(R.id.map_markers_bottom_navigation);
BottomNavigationViewHelper.disableShiftMode(bottomNav); BottomNavigationViewHelper.disableShiftMode(bottomNav);
if (!lightTheme) { toolbarTitle.setTextColor(ContextCompat.getColor(getContext(), lightTheme ? R.color.active_buttons_and_links_text_light : R.color.text_color_primary_dark));
toolbarTitle.setTextColor(ContextCompat.getColor(getContext(), R.color.text_color_primary_dark)); bottomNav.setItemIconTintList(ContextCompat.getColorStateList(getContext(), lightTheme ? R.color.bottom_navigation_color_selector_light : R.color.bottom_navigation_color_selector_dark));
bottomNav.setItemIconTintList(ContextCompat.getColorStateList(getContext(), R.color.bottom_navigation_color_selector_dark)); bottomNav.setItemTextColor(ContextCompat.getColorStateList(getContext(), lightTheme ? R.color.bottom_navigation_color_selector_light : R.color.bottom_navigation_color_selector_dark));
bottomNav.setItemTextColor(ContextCompat.getColorStateList(getContext(), R.color.bottom_navigation_color_selector_dark));
}
if (groupIdToOpen != null) { if (groupIdToOpen != null) {
activeFragment.stopLocationUpdate(); activeFragment.stopLocationUpdate();
groupsFragment.startLocationUpdate(); groupsFragment.startLocationUpdate();