diff --git a/OsmAnd/res/values-large/sizes.xml b/OsmAnd/res/values-large/sizes.xml
index 419fd9c50c..3a66f51ff1 100644
--- a/OsmAnd/res/values-large/sizes.xml
+++ b/OsmAnd/res/values-large/sizes.xml
@@ -35,8 +35,7 @@
3dp
3dp
4dp
- 1dp
- 2dp
+
6dp
diff --git a/OsmAnd/res/values/colors.xml b/OsmAnd/res/values/colors.xml
index 254cf0ee4f..c4285e4bd9 100644
--- a/OsmAnd/res/values/colors.xml
+++ b/OsmAnd/res/values/colors.xml
@@ -29,9 +29,9 @@
#ff8f00
#4C000000
#ffffff
- #50000000
- #30ffffff
- #50ffffff
+ #a0000000
+ #d0ffffff
+ #80ffffff
#80ffffff
#e5e5e5
#536dfe
diff --git a/OsmAnd/res/values/sizes.xml b/OsmAnd/res/values/sizes.xml
index cdd39ab664..a5337ec207 100644
--- a/OsmAnd/res/values/sizes.xml
+++ b/OsmAnd/res/values/sizes.xml
@@ -84,6 +84,7 @@
2dp
3dp
1dp
+ 2dp
23sp
15sp
diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml
index dd164196d8..9b20c35895 100644
--- a/OsmAnd/res/values/strings.xml
+++ b/OsmAnd/res/values/strings.xml
@@ -1482,7 +1482,7 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
Free version
Show POI description
North America
- Netherlands
+ Europe - Netherlands
North America - United States
Central America
South America
diff --git a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java
index 292a95ce96..fd51ab83c8 100644
--- a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java
+++ b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java
@@ -137,7 +137,7 @@ public class ContextMenuAdapter {
}
int lstLight = iconListLight.get(pos);
if(lstLight != 0) {
- return ctx.getIconsCache().getActionBarIcon(lstLight, light);
+ return ctx.getIconsCache().getIcon(lstLight, light);
}
return null;
}
diff --git a/OsmAnd/src/net/osmand/plus/IconsCache.java b/OsmAnd/src/net/osmand/plus/IconsCache.java
index 04c0f3975b..34a9afb995 100644
--- a/OsmAnd/src/net/osmand/plus/IconsCache.java
+++ b/OsmAnd/src/net/osmand/plus/IconsCache.java
@@ -55,11 +55,11 @@ public class IconsCache {
}
- public Drawable getActionBarIcon(int id) {
+ public Drawable getIcon(int id) {
return getDrawable(id, 0);
}
- public Drawable getActionBarIcon(int id, boolean light) {
+ public Drawable getIcon(int id, boolean light) {
return getDrawable(id, light ? R.color.icon_color_light : 0);
}
diff --git a/OsmAnd/src/net/osmand/plus/activities/ActionBarPreferenceActivity.java b/OsmAnd/src/net/osmand/plus/activities/ActionBarPreferenceActivity.java
index 2cd294629c..9ed66d56bc 100644
--- a/OsmAnd/src/net/osmand/plus/activities/ActionBarPreferenceActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/ActionBarPreferenceActivity.java
@@ -44,7 +44,7 @@ public abstract class ActionBarPreferenceActivity extends PreferenceActivity {
shadowView = null;
}
tb.setClickable(true);
- tb.setNavigationIcon(((OsmandApplication)getApplication()).getIconsCache().getActionBarIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha));
+ tb.setNavigationIcon(((OsmandApplication)getApplication()).getIconsCache().getIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha));
tb.setBackgroundColor(getResources().getColor(getResIdFromAttribute(this, R.attr.pstsTabBackground)));
tb.setTitleTextColor(getResources().getColor(getResIdFromAttribute(this, R.attr.pstsTextColor)));
tb.setNavigationOnClickListener(new View.OnClickListener() {
diff --git a/OsmAnd/src/net/osmand/plus/activities/HelpActivity.java b/OsmAnd/src/net/osmand/plus/activities/HelpActivity.java
index 7cf580294f..ea94dac2a3 100644
--- a/OsmAnd/src/net/osmand/plus/activities/HelpActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/HelpActivity.java
@@ -155,7 +155,7 @@ public class HelpActivity extends OsmandActionBarActivity {
public MenuItem createMenuItem(Menu m, int id, int titleRes, int iconDark, int menuItemType) {
MenuItem menuItem = m.add(0, id, 0, titleRes);
if (iconDark != 0) {
- menuItem.setIcon(getMyApplication().getIconsCache().getActionBarIcon(iconDark));
+ menuItem.setIcon(getMyApplication().getIconsCache().getIcon(iconDark));
}
MenuItemCompat.setShowAsAction(menuItem, menuItemType);
menuItem.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
diff --git a/OsmAnd/src/net/osmand/plus/activities/NavigatePointFragment.java b/OsmAnd/src/net/osmand/plus/activities/NavigatePointFragment.java
index 4c6e8b3dbf..aae0fc3aaf 100644
--- a/OsmAnd/src/net/osmand/plus/activities/NavigatePointFragment.java
+++ b/OsmAnd/src/net/osmand/plus/activities/NavigatePointFragment.java
@@ -122,7 +122,7 @@ public class NavigatePointFragment extends Fragment implements SearchActivityChi
}
MenuItem menuItem = menu.add(0, NAVIGATE_TO, 0, R.string.context_menu_item_directions_to);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
- menuItem = menuItem.setIcon(app.getIconsCache().getActionBarIcon(R.drawable.ic_action_gdirections_dark, light));
+ menuItem = menuItem.setIcon(app.getIconsCache().getIcon(R.drawable.ic_action_gdirections_dark, light));
menuItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
@Override
@@ -135,11 +135,11 @@ public class NavigatePointFragment extends Fragment implements SearchActivityChi
if (targets.getPointToNavigate() != null) {
menuItem = menu.add(0, ADD_WAYPOINT, 0, R.string.context_menu_item_intermediate_point);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
- menuItem = menuItem.setIcon(app.getIconsCache().getActionBarIcon(R.drawable.ic_action_flage_dark, light));
+ menuItem = menuItem.setIcon(app.getIconsCache().getIcon(R.drawable.ic_action_flage_dark, light));
} else {
menuItem = menu.add(0, ADD_WAYPOINT, 0, R.string.context_menu_item_destination_point);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
- menuItem = menuItem.setIcon(app.getIconsCache().getActionBarIcon(R.drawable.ic_action_flag_dark, light));
+ menuItem = menuItem.setIcon(app.getIconsCache().getIcon(R.drawable.ic_action_flag_dark, light));
}
menuItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
@Override
@@ -151,7 +151,7 @@ public class NavigatePointFragment extends Fragment implements SearchActivityChi
//}
menuItem = menu.add(0, SHOW_ON_MAP, 0, R.string.shared_string_show_on_map);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
- menuItem = menuItem.setIcon(app.getIconsCache().getActionBarIcon(R.drawable.ic_action_marker_dark, light));
+ menuItem = menuItem.setIcon(app.getIconsCache().getIcon(R.drawable.ic_action_marker_dark, light));
menuItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
@Override
@@ -163,7 +163,7 @@ public class NavigatePointFragment extends Fragment implements SearchActivityChi
menuItem = menu.add(0, ADD_TO_FAVORITE, 0, R.string.shared_string_add_to_favorites);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
- menuItem = menuItem.setIcon(app.getIconsCache().getActionBarIcon(R.drawable.ic_action_fav_dark, light));
+ menuItem = menuItem.setIcon(app.getIconsCache().getIcon(R.drawable.ic_action_fav_dark, light));
menuItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
@Override
diff --git a/OsmAnd/src/net/osmand/plus/activities/OsmandActionBarActivity.java b/OsmAnd/src/net/osmand/plus/activities/OsmandActionBarActivity.java
index b49c97d5af..a52d6fa0b4 100644
--- a/OsmAnd/src/net/osmand/plus/activities/OsmandActionBarActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/OsmandActionBarActivity.java
@@ -18,7 +18,7 @@ public class OsmandActionBarActivity extends ActionBarActivity {
//should be called after set content view
protected void setupHomeButton(){
- Drawable back = ((OsmandApplication)getApplication()).getIconsCache().getActionBarIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha);
+ Drawable back = ((OsmandApplication)getApplication()).getIconsCache().getIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha);
back.setColorFilter(getResources().getColor(R.color.color_white), PorterDuff.Mode.MULTIPLY);
getSupportActionBar().setHomeButtonEnabled(true);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
diff --git a/OsmAnd/src/net/osmand/plus/activities/OsmandListActivity.java b/OsmAnd/src/net/osmand/plus/activities/OsmandListActivity.java
index d8ca448e2b..6d21d59ab0 100644
--- a/OsmAnd/src/net/osmand/plus/activities/OsmandListActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/OsmandListActivity.java
@@ -48,7 +48,7 @@ public abstract class OsmandListActivity extends
public MenuItem createMenuItem(Menu m, int id, int titleRes, int iconDark, int menuItemType) {
MenuItem menuItem = m.add(0, id, 0, titleRes);
if (iconDark != 0) {
- menuItem.setIcon(getMyApplication().getIconsCache().getActionBarIcon(iconDark));
+ menuItem.setIcon(getMyApplication().getIconsCache().getIcon(iconDark));
}
menuItem.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsActivity.java
index f4a78f2e08..32b6611f4c 100644
--- a/OsmAnd/src/net/osmand/plus/activities/SettingsActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/SettingsActivity.java
@@ -145,7 +145,7 @@ public class SettingsActivity extends SettingsBaseActivity {
ll.setOrientation(LinearLayout.VERTICAL);
Toolbar tb = new Toolbar(this);
tb.setClickable(true);
- Drawable back = ((OsmandApplication)getApplication()).getIconsCache().getActionBarIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha);
+ Drawable back = ((OsmandApplication)getApplication()).getIconsCache().getIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha);
tb.setNavigationIcon(back);
tb.setTitle(R.string.about_settings);
tb.setBackgroundColor(getResources().getColor( getResIdFromAttribute(this, R.attr.pstsTabBackground)));
diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchByNameAbstractActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchByNameAbstractActivity.java
index 3a31ff518f..148c22109b 100644
--- a/OsmAnd/src/net/osmand/plus/activities/search/SearchByNameAbstractActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchByNameAbstractActivity.java
@@ -508,7 +508,7 @@ public abstract class SearchByNameAbstractActivity extends OsmandListActivity
MenuItem menuItem = menu.add(0, NAVIGATE_TO, 0, R.string.context_menu_item_directions_to);
MenuItemCompat.setShowAsAction(menuItem,
MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
- menuItem = menuItem.setIcon(app.getIconsCache().getActionBarIcon(R.drawable.ic_action_gdirections_dark));
+ menuItem = menuItem.setIcon(app.getIconsCache().getIcon(R.drawable.ic_action_gdirections_dark));
menuItem.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
@@ -521,12 +521,12 @@ public abstract class SearchByNameAbstractActivity extends OsmandListActivity
menuItem = menu.add(0, ADD_WAYPOINT, 0, R.string.context_menu_item_intermediate_point);
MenuItemCompat.setShowAsAction(menuItem,
MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
- menuItem = menuItem.setIcon(app.getIconsCache().getActionBarIcon(R.drawable.ic_action_flage_dark));
+ menuItem = menuItem.setIcon(app.getIconsCache().getIcon(R.drawable.ic_action_flage_dark));
} else {
menuItem = menu.add(0, ADD_WAYPOINT, 0, R.string.context_menu_item_destination_point);
MenuItemCompat.setShowAsAction(menuItem,
MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
- menuItem = menuItem.setIcon(app.getIconsCache().getActionBarIcon( R.drawable.ic_action_flag_dark));
+ menuItem = menuItem.setIcon(app.getIconsCache().getIcon( R.drawable.ic_action_flag_dark));
}
menuItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
@Override
@@ -538,7 +538,7 @@ public abstract class SearchByNameAbstractActivity extends OsmandListActivity
menuItem = menu.add(0, SHOW_ON_MAP, 0, R.string.shared_string_show_on_map);
MenuItemCompat.setShowAsAction(menuItem,
MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
- menuItem = menuItem.setIcon(app.getIconsCache().getActionBarIcon(R.drawable.ic_action_marker_dark));
+ menuItem = menuItem.setIcon(app.getIconsCache().getIcon(R.drawable.ic_action_marker_dark));
menuItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
@Override
@@ -551,7 +551,7 @@ public abstract class SearchByNameAbstractActivity extends OsmandListActivity
menuItem = menu.add(0, ADD_TO_FAVORITE, 0, R.string.shared_string_add_to_favorites);
MenuItemCompat.setShowAsAction(menuItem,
MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
- menuItem = menuItem.setIcon(app.getIconsCache().getActionBarIcon(R.drawable.ic_action_fav_dark));
+ menuItem = menuItem.setIcon(app.getIconsCache().getIcon(R.drawable.ic_action_fav_dark));
menuItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
@Override
diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java
index 22e39a5b75..de01fdec8d 100644
--- a/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java
@@ -132,7 +132,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
});
showFilterItem = menu.add(0, FILTER, 0, R.string.search_poi_filter);
MenuItemCompat.setShowAsAction(showFilterItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
- showFilterItem = showFilterItem.setIcon(getMyApplication().getIconsCache().getActionBarIcon(
+ showFilterItem = showFilterItem.setIcon(getMyApplication().getIconsCache().getIcon(
R.drawable.ic_action_filter_dark));
showFilterItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
@Override
@@ -155,7 +155,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
showOnMapItem = menu.add(0, SHOW_ON_MAP, 0, R.string.shared_string_show_on_map);
MenuItemCompat.setShowAsAction(showOnMapItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
- showOnMapItem = showOnMapItem.setIcon(getMyApplication().getIconsCache().getActionBarIcon(
+ showOnMapItem = showOnMapItem.setIcon(getMyApplication().getIconsCache().getIcon(
R.drawable.ic_show_on_map));
showOnMapItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
@Override
diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java
index bbc0b645f0..e6e755bace 100644
--- a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java
+++ b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java
@@ -215,7 +215,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks {
lst.setVisibility(View.GONE);
ImageView back = (ImageView) dashboardView.findViewById(R.id.toolbar_back);
back.setImageDrawable(
- ((OsmandApplication)getMyApplication()).getIconsCache().getActionBarIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha));
+ ((OsmandApplication)getMyApplication()).getIconsCache().getIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha));
back.setOnClickListener(new View.OnClickListener() {
@Override
@@ -247,7 +247,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks {
if (getMyApplication().getWaypointHelper().isRouteCalculated()) {
flat.setVisibility(View.VISIBLE);
final boolean flatNow = visibleType == DashboardType.WAYPOINTS_FLAT;
- flat.setImageDrawable(iconsCache.getActionBarIcon(flatNow ? R.drawable.ic_tree_list_dark
+ flat.setImageDrawable(iconsCache.getIcon(flatNow ? R.drawable.ic_tree_list_dark
: R.drawable.ic_flat_list_dark));
flat.setOnClickListener(new View.OnClickListener() {
@@ -284,9 +284,9 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks {
});
lst.setVisibility(View.VISIBLE);
if (visibleType == DashboardType.DASHBOARD) {
- lst.setImageDrawable(iconsCache.getActionBarIcon(R.drawable.ic_navigation_drawer));
+ lst.setImageDrawable(iconsCache.getIcon(R.drawable.ic_navigation_drawer));
} else if (visibleType == DashboardType.LIST_MENU) {
- lst.setImageDrawable(iconsCache.getActionBarIcon(R.drawable.ic_dashboard_dark));
+ lst.setImageDrawable(iconsCache.getIcon(R.drawable.ic_dashboard_dark));
}
lst.setOnClickListener(new View.OnClickListener() {
@Override
diff --git a/OsmAnd/src/net/osmand/plus/sherpafy/TourViewActivity.java b/OsmAnd/src/net/osmand/plus/sherpafy/TourViewActivity.java
index 12daf37181..67db28f9fe 100644
--- a/OsmAnd/src/net/osmand/plus/sherpafy/TourViewActivity.java
+++ b/OsmAnd/src/net/osmand/plus/sherpafy/TourViewActivity.java
@@ -231,7 +231,7 @@ public class TourViewActivity extends OsmandActionBarActivity {
final MenuItem.OnMenuItemClickListener listener) {
MenuItem menuItem = m.add(0, id, 0, titleRes);
if (r != 0) {
- menuItem.setIcon(getMyApplication().getIconsCache().getActionBarIcon(r));
+ menuItem.setIcon(getMyApplication().getIconsCache().getIcon(r));
}
MenuItemCompat.setShowAsAction(menuItem, menuItemType);
menuItem.setOnMenuItemClickListener(listener);
diff --git a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java
index 63a3167b28..909ce60724 100644
--- a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java
+++ b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java
@@ -174,7 +174,8 @@ public class MapControlsLayer extends OsmandMapLayer {
private void initTopControls() {
View configureMap = mapActivity.findViewById(R.id.map_layers_button);
controls.add(createHudButton((ImageView) configureMap, R.drawable.map_layer_dark)
- .setIconColorId(R.drawable.map_layer_dark, R.drawable.map_layer_night));
+ .setIconsId(R.drawable.map_layer_dark, R.drawable.map_layer_night)
+ .setBg(R.drawable.btn_inset_circle_trans, R.drawable.btn_inset_circle_night));
configureMap.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -184,7 +185,8 @@ public class MapControlsLayer extends OsmandMapLayer {
});
View compass = mapActivity.findViewById(R.id.map_compass_button);
- compassHud = createHudButton((ImageView) compass, R.drawable.map_compass).setIconColorId(0);
+ compassHud = createHudButton((ImageView) compass, R.drawable.map_compass).setIconColorId(0).
+ setBg(R.drawable.btn_inset_circle_trans, R.drawable.btn_inset_circle_night);
compassHud.compass = true;
controls.add(compassHud);
compass.setOnClickListener(new View.OnClickListener() {
@@ -345,8 +347,11 @@ public class MapControlsLayer extends OsmandMapLayer {
mapActivity.getMapViewTrackingUtilities().backToLocationImpl();
}
});
-
+ controls.add(createHudButton(mapActivity.findViewById(R.id.map_app_mode_shadow), 0).setBg(
+ R.drawable.btn_round_trans, R.drawable.btn_round_transparent));
View backToMenuButton = mapActivity.findViewById(R.id.map_menu_button);
+
+
menuControl = createHudButton((ImageView) backToMenuButton, R.drawable.map_dashboard).setBg(
R.drawable.btn_round, R.drawable.btn_round_night);
controls.add(menuControl);
@@ -398,7 +403,7 @@ public class MapControlsLayer extends OsmandMapLayer {
final OsmandMapTileView view = mapActivity.getMapView();
View zoomInButton = mapActivity.findViewById(R.id.map_zoom_in_button);
controls.add(createHudButton((ImageView) zoomInButton, R.drawable.map_zoom_in).
- setIconColorId(R.drawable.map_zoom_in, R.drawable.map_zoom_in_night).setRoundTransparent());
+ setIconsId(R.drawable.map_zoom_in, R.drawable.map_zoom_in_night).setRoundTransparent());
zoomInButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -415,7 +420,7 @@ public class MapControlsLayer extends OsmandMapLayer {
zoomInButton.setOnLongClickListener(listener);
View zoomOutButton = mapActivity.findViewById(R.id.map_zoom_out_button);
controls.add(createHudButton((ImageView) zoomOutButton, R.drawable.map_zoom_out).
- setIconColorId(R.drawable.map_zoom_out, R.drawable.map_zoom_out_night).setRoundTransparent());
+ setIconsId(R.drawable.map_zoom_out, R.drawable.map_zoom_out_night).setRoundTransparent());
zoomOutButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -546,7 +551,7 @@ public class MapControlsLayer extends OsmandMapLayer {
zoomText.setVisibility(View.GONE);
appModeIcon.setVisibility(View.VISIBLE);
appModeIcon.setImageDrawable(
- app.getIconsCache().getActionBarIcon(
+ app.getIconsCache().getIcon(
settings.getApplicationMode().getSmallIconDark(), !isNight));
} else {
zoomText.setVisibility(View.VISIBLE);
@@ -698,15 +703,18 @@ public class MapControlsLayer extends OsmandMapLayer {
int bgDark;
int bgLight;
int resId;
- int resLight = R.color.icon_color_light;
- int resDark = 0;
+ int resLightId;
+ int resDarkId;
+ int resClrLight = R.color.icon_color_light;
+ int resClrDark = 0;
+
boolean nightMode = false;
boolean f = true;
boolean compass;
public MapHudButton setRoundTransparent() {
- setBg(R.drawable.btn_circle_trans);
+ setBg(R.drawable.btn_circle_trans, R.drawable.btn_circle_night);
return this;
}
@@ -754,21 +762,31 @@ public class MapControlsLayer extends OsmandMapLayer {
}
public MapHudButton setIconColorId(int clr) {
- if (resLight == clr && resDark == clr) {
+ if (resClrLight == clr && resClrDark == clr) {
return this;
}
- resLight = clr;
- resDark = clr;
+ resClrLight = clr;
+ resClrDark = clr;
+ f = true;
+ return this;
+ }
+
+ public MapHudButton setIconsId(int icnLight, int icnDark) {
+ if (resLightId == icnLight && resDarkId == icnDark) {
+ return this;
+ }
+ resLightId = icnLight;
+ resDarkId = icnDark;
f = true;
return this;
}
public MapHudButton setIconColorId(int clrLight, int clrDark) {
- if (resLight == clrLight && resDark == clrDark) {
+ if (resClrLight == clrLight && resClrDark == clrDark) {
return this;
}
- resLight = clrLight;
- resDark = clrDark;
+ resClrLight = clrLight;
+ resClrDark = clrDark;
f = true;
return this;
}
@@ -778,21 +796,28 @@ public class MapControlsLayer extends OsmandMapLayer {
return;
}
f = false;
- nightMode = night;
+ nightMode = night;
if (bgDark != 0 && bgLight != 0) {
iv.setBackgroundDrawable(ctx.getResources().getDrawable(night ? bgDark : bgLight));
}
+ Drawable d = null;
+ if(resDarkId != 0 && nightMode) {
+ d = ctx.getIconsCache().getIcon(resDarkId);
+ } else if(resLightId != 0 && !nightMode) {
+ d = ctx.getIconsCache().getIcon(resLightId);
+ } else if(resId != 0){
+ d = ctx.getIconsCache().getIcon(resId, nightMode ? resClrDark : resClrLight);
+ }
+
if (iv instanceof ImageView) {
if (compass) {
- ((ImageView) iv).setImageDrawable(new CompassDrawable(ctx.getIconsCache().getIcon(resId,
- nightMode ? resDark : resLight)));
+ ((ImageView) iv).setImageDrawable(new CompassDrawable(d));
} else {
- ((ImageView) iv).setImageDrawable(ctx.getIconsCache()
- .getIcon(resId, nightMode ? resDark : resLight));
+ ((ImageView) iv).setImageDrawable(d);
}
} else if (iv instanceof TextView) {
((TextView) iv).setCompoundDrawablesWithIntrinsicBounds(
- ctx.getIconsCache().getIcon(resId, nightMode ? resDark : resLight), null, null, null);
+ d, null, null, null);
}
}
diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java
index 23651ad224..7ee7387b87 100644
--- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java
+++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java
@@ -216,9 +216,9 @@ public class MapInfoWidgetsFactory {
ImageView all = (ImageView) waypointInfoBar.findViewById(R.id.waypoint_more);
ImageView remove = (ImageView) waypointInfoBar.findViewById(R.id.waypoint_close);
all.setImageDrawable(map.getMyApplication().getIconsCache()
- .getActionBarIcon(R.drawable.ic_overflow_menu_white, !nightMode));
+ .getIcon(R.drawable.ic_overflow_menu_white, !nightMode));
remove.setImageDrawable(map.getMyApplication().getIconsCache()
- .getActionBarIcon(R.drawable.ic_action_remove_dark, !nightMode));
+ .getIcon(R.drawable.ic_action_remove_dark, !nightMode));
}