Fix ic_action_favorite icon, fix myLocation icon size

This commit is contained in:
Dima-1 2020-05-07 23:42:19 +03:00
parent 9ba43fe2a9
commit 6d2fadb952
47 changed files with 60 additions and 63 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -23,7 +23,7 @@
android:layout_marginLeft="@dimen/content_padding" android:layout_marginLeft="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding" android:layout_marginRight="@dimen/content_padding"
android:layout_marginTop="@dimen/content_padding" android:layout_marginTop="@dimen/content_padding"
android:src="@drawable/ic_action_fav_dark" android:src="@drawable/ic_action_favorite"
android:layout_marginStart="@dimen/content_padding" android:layout_marginStart="@dimen/content_padding"
android:layout_marginEnd="@dimen/content_padding" /> android:layout_marginEnd="@dimen/content_padding" />

View file

@ -24,7 +24,7 @@
android:layout_width="56dp" android:layout_width="56dp"
android:layout_height="25dp" android:layout_height="25dp"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:src="@drawable/ic_action_fav_dark"/> android:src="@drawable/ic_action_favorite"/>
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"

View file

@ -20,7 +20,7 @@
android:scaleType="centerInside" android:scaleType="centerInside"
android:layout_width="@dimen/map_button_shadow_width" android:layout_width="@dimen/map_button_shadow_width"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:src="@drawable/ic_action_fav_dark" tools:src="@drawable/ic_action_favorite"
tools:visibility="visible" tools:visibility="visible"
android:visibility="gone"/> android:visibility="gone"/>

View file

@ -62,7 +62,7 @@
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginEnd="@dimen/bottom_sheet_content_margin" android:layout_marginEnd="@dimen/bottom_sheet_content_margin"
android:layout_marginRight="@dimen/bottom_sheet_content_margin" android:layout_marginRight="@dimen/bottom_sheet_content_margin"
tools:src="@drawable/ic_action_flag_dark"/> tools:src="@drawable/ic_action_flag"/>
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"

View file

@ -22,7 +22,7 @@
android:layout_marginRight="16dp" android:layout_marginRight="16dp"
android:scaleType="centerInside" android:scaleType="centerInside"
android:tint="?attr/default_icon_color" android:tint="?attr/default_icon_color"
android:src="@drawable/ic_action_flag_dark" android:src="@drawable/ic_action_flag"
android:layout_marginEnd="16dp" /> android:layout_marginEnd="16dp" />
<TextView <TextView

View file

@ -78,7 +78,7 @@
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:scaleType="centerInside" android:scaleType="centerInside"
android:tint="?attr/default_icon_color" android:tint="?attr/default_icon_color"
android:src="@drawable/ic_action_fav_dark"/> android:src="@drawable/ic_action_favorite"/>
</LinearLayout> </LinearLayout>

View file

@ -78,7 +78,7 @@
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:scaleType="centerInside" android:scaleType="centerInside"
android:tint="?attr/default_icon_color" android:tint="?attr/default_icon_color"
android:src="@drawable/ic_action_fav_dark"/> android:src="@drawable/ic_action_favorite"/>
</LinearLayout> </LinearLayout>

View file

@ -19,7 +19,7 @@
<!--android:scaleType="centerInside"--> <!--android:scaleType="centerInside"-->
<!--android:tint="@color/color_white"--> <!--android:tint="@color/color_white"-->
<!--android:background="?attr/selectableItemBackground"--> <!--android:background="?attr/selectableItemBackground"-->
<!--android:src="@drawable/ic_action_flag_dark" />--> <!--android:src="@drawable/ic_action_flag" />-->
<!----> <!---->
<!--</LinearLayout>--> <!--</LinearLayout>-->
@ -51,7 +51,7 @@
android:scaleType="centerInside" android:scaleType="centerInside"
app:tint="?attr/app_bar_primary_item_color" app:tint="?attr/app_bar_primary_item_color"
android:layout_marginTop="24dp" android:layout_marginTop="24dp"
android:src="@drawable/ic_action_flag_dark" android:src="@drawable/ic_action_flag"
android:layout_marginStart="16dp" /> android:layout_marginStart="16dp" />
<androidx.appcompat.widget.AppCompatEditText <androidx.appcompat.widget.AppCompatEditText

View file

@ -35,7 +35,7 @@
android:layout_marginRight="8dp" android:layout_marginRight="8dp"
android:scaleType="centerInside" android:scaleType="centerInside"
android:tint="?attr/default_icon_color" android:tint="?attr/default_icon_color"
android:src="@drawable/ic_action_flag_dark" android:src="@drawable/ic_action_flag"
android:layout_marginEnd="8dp" /> android:layout_marginEnd="8dp" />
<LinearLayout <LinearLayout

View file

@ -50,7 +50,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:src="@drawable/ic_action_fav_dark" /> android:src="@drawable/ic_action_favorite" />
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"

View file

@ -31,7 +31,7 @@
android:layout_width="56dp" android:layout_width="56dp"
android:layout_height="25dp" android:layout_height="25dp"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:src="@drawable/ic_action_fav_dark"/> android:src="@drawable/ic_action_favorite"/>
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"

View file

@ -478,7 +478,7 @@ public class MapMarkersHelper {
int type = group.getType(); int type = group.getType();
if (type != -1) { if (type != -1) {
header.iconRes = type == MapMarkersGroup.FAVORITES_TYPE header.iconRes = type == MapMarkersGroup.FAVORITES_TYPE
? R.drawable.ic_action_fav_dark : R.drawable.ic_action_polygom_dark; ? R.drawable.ic_action_favorite : R.drawable.ic_action_polygom_dark;
categoriesSubHeader.iconRes = R.drawable.ic_action_filter; categoriesSubHeader.iconRes = R.drawable.ic_action_filter;
} }
header.group = group; header.group = group;

View file

@ -179,7 +179,7 @@ public class EditFavoriteGroupDialogFragment extends MenuBottomSheetDialogFragme
final boolean synced = markersGr != null; final boolean synced = markersGr != null;
BaseBottomSheetItem markersGroupItem = new SimpleBottomSheetItem.Builder() BaseBottomSheetItem markersGroupItem = new SimpleBottomSheetItem.Builder()
.setIcon(getContentIcon(synced ? R.drawable.ic_action_delete_dark : R.drawable.ic_action_flag_dark)) .setIcon(getContentIcon(synced ? R.drawable.ic_action_delete_dark : R.drawable.ic_action_flag))
.setTitle(getString(synced ? R.string.remove_from_map_markers : R.string.shared_string_add_to_map_markers)) .setTitle(getString(synced ? R.string.remove_from_map_markers : R.string.shared_string_add_to_map_markers))
.setLayoutId(R.layout.bottom_sheet_item_simple) .setLayoutId(R.layout.bottom_sheet_item_simple)
.setOnClickListener(new View.OnClickListener() { .setOnClickListener(new View.OnClickListener() {

View file

@ -386,7 +386,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment implemen
if (!MenuItemCompat.isActionViewExpanded(mi)) { if (!MenuItemCompat.isActionViewExpanded(mi)) {
createMenuItem(menu, IMPORT_FAVOURITES_ID, R.string.shared_string_add_to_favorites, R.drawable.ic_action_plus, MenuItemCompat.SHOW_AS_ACTION_ALWAYS); createMenuItem(menu, IMPORT_FAVOURITES_ID, R.string.shared_string_add_to_favorites, R.drawable.ic_action_plus, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
createMenuItem(menu, SHARE_ID, R.string.shared_string_share, R.drawable.ic_action_gshare_dark, MenuItemCompat.SHOW_AS_ACTION_ALWAYS); createMenuItem(menu, SHARE_ID, R.string.shared_string_share, R.drawable.ic_action_gshare_dark, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
createMenuItem(menu, SELECT_MAP_MARKERS_ID, R.string.select_map_markers, R.drawable.ic_action_flag_dark, MenuItemCompat.SHOW_AS_ACTION_ALWAYS); createMenuItem(menu, SELECT_MAP_MARKERS_ID, R.string.select_map_markers, R.drawable.ic_action_flag, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
createMenuItem(menu, DELETE_ID, R.string.shared_string_delete, R.drawable.ic_action_delete_dark, MenuItemCompat.SHOW_AS_ACTION_ALWAYS); createMenuItem(menu, DELETE_ID, R.string.shared_string_delete, R.drawable.ic_action_delete_dark, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
} }
} }
@ -413,7 +413,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment implemen
public boolean onCreateActionMode(ActionMode mode, Menu menu) { public boolean onCreateActionMode(ActionMode mode, Menu menu) {
enableSelectionMode(true); enableSelectionMode(true);
createMenuItem(menu, SELECT_MAP_MARKERS_ACTION_MODE_ID, R.string.select_map_markers, createMenuItem(menu, SELECT_MAP_MARKERS_ACTION_MODE_ID, R.string.select_map_markers,
R.drawable.ic_action_flag_dark, R.drawable.ic_action_flag,
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM); MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
favoritesSelected.clear(); favoritesSelected.clear();
groupsToDelete.clear(); groupsToDelete.clear();

View file

@ -349,14 +349,14 @@ public class MapActivityActions implements DialogProvider {
adapter.addItem(itemBuilder adapter.addItem(itemBuilder
.setTitleId(selectedObj instanceof FavouritePoint ? R.string.favourites_context_menu_edit : R.string.shared_string_add, mapActivity) .setTitleId(selectedObj instanceof FavouritePoint ? R.string.favourites_context_menu_edit : R.string.shared_string_add, mapActivity)
.setId(MAP_CONTEXT_MENU_ADD_ID) .setId(MAP_CONTEXT_MENU_ADD_ID)
.setIcon(R.drawable.ic_action_fav_dark) .setIcon(R.drawable.ic_action_favorite_stroke)
.setOrder(10) .setOrder(10)
.createItem()); .createItem());
adapter.addItem(itemBuilder adapter.addItem(itemBuilder
.setTitleId(R.string.shared_string_marker, mapActivity) .setTitleId(R.string.shared_string_marker, mapActivity)
.setId(MAP_CONTEXT_MENU_MARKER_ID) .setId(MAP_CONTEXT_MENU_MARKER_ID)
.setOrder(20) .setOrder(20)
.setIcon(R.drawable.ic_action_flag_dark) .setIcon(R.drawable.ic_action_flag_stroke)
.createItem()); .createItem());
adapter.addItem(itemBuilder adapter.addItem(itemBuilder
.setTitleId(R.string.shared_string_share, mapActivity) .setTitleId(R.string.shared_string_share, mapActivity)
@ -788,7 +788,7 @@ public class MapActivityActions implements DialogProvider {
optionsMenuHelper.addItem(new ItemBuilder().setTitleId(R.string.map_markers, mapActivity) optionsMenuHelper.addItem(new ItemBuilder().setTitleId(R.string.map_markers, mapActivity)
.setId(DRAWER_MAP_MARKERS_ID) .setId(DRAWER_MAP_MARKERS_ID)
.setIcon(R.drawable.ic_action_flag_dark) .setIcon(R.drawable.ic_action_flag)
.setListener(new ItemClickListener() { .setListener(new ItemClickListener() {
@Override @Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) { public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
@ -801,7 +801,7 @@ public class MapActivityActions implements DialogProvider {
optionsMenuHelper.addItem(new ItemBuilder().setTitleId(R.string.shared_string_my_places, mapActivity) optionsMenuHelper.addItem(new ItemBuilder().setTitleId(R.string.shared_string_my_places, mapActivity)
.setId(DRAWER_MY_PLACES_ID) .setId(DRAWER_MY_PLACES_ID)
.setIcon(R.drawable.ic_action_fav_dark) .setIcon(R.drawable.ic_action_favorite)
.setListener(new ItemClickListener() { .setListener(new ItemClickListener() {
@Override @Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) { public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {

View file

@ -177,7 +177,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
}); });
showOnMapItem.setEnabled(!isNameSearch() || amenityAdapter.getCount() > 0); showOnMapItem.setEnabled(!isNameSearch() || amenityAdapter.getCount() > 0);
if (filter != null && !isNameSearch()) { if (filter != null && !isNameSearch()) {
createMenuItem(omenu, SAVE_FILTER, R.string.edit_filter_save_as_menu_item, R.drawable.ic_action_fav_dark, createMenuItem(omenu, SAVE_FILTER, R.string.edit_filter_save_as_menu_item, R.drawable.ic_action_favorite,
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM); MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
if (!filter.isStandardFilter()) { if (!filter.isStandardFilter()) {
createMenuItem(omenu, DELETE_FILTER, R.string.shared_string_delete, R.drawable.ic_action_delete_dark, createMenuItem(omenu, DELETE_FILTER, R.string.shared_string_delete, R.drawable.ic_action_delete_dark,

View file

@ -180,7 +180,7 @@ public class DashWaypointsFragment extends DashLocationFragment {
MenuItem item; MenuItem item;
// item = optionsMenu.getMenu().add( // item = optionsMenu.getMenu().add(
// R.string.shared_string_add_to_favorites).setIcon(getMyApplication().getIconsCache(). // R.string.shared_string_add_to_favorites).setIcon(getMyApplication().getIconsCache().
// getIcon(R.drawable.ic_action_fav_dark)); // getIcon(R.drawable.ic_action_favorite));
// item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { // item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
// @Override // @Override
// public boolean onMenuItemClick(MenuItem item) { // public boolean onMenuItemClick(MenuItem item) {

View file

@ -405,8 +405,10 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, IRouteInfo
actionButton = new ImageView(mapActivity); actionButton = new ImageView(mapActivity);
int btnSizePx = mapActivity.getResources().getDimensionPixelSize(R.dimen.map_button_size); int btnSizePx = mapActivity.getResources().getDimensionPixelSize(R.dimen.map_button_size);
actionButton.setLayoutParams(getActionButtonLayoutParams(btnSizePx)); actionButton.setLayoutParams(getActionButtonLayoutParams(btnSizePx));
actionButton.setScaleType(ScaleType.CENTER);
actionButton.setBackgroundResource(R.drawable.btn_circle_blue); actionButton.setBackgroundResource(R.drawable.btn_circle_blue);
int iconSizePx = mapActivity.getResources().getDimensionPixelSize(R.dimen.standard_icon_size);
int iconPadding = (btnSizePx - iconSizePx) / 2;
actionButton.setPadding(iconPadding, iconPadding, iconPadding, iconPadding);
hideActionButton(); hideActionButton();

View file

@ -38,7 +38,6 @@ import net.osmand.plus.GpxSelectionHelper;
import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandPlugin; import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.OsmandSettings; import net.osmand.plus.OsmandSettings;
import net.osmand.plus.OsmandSettings.OsmandPreference;
import net.osmand.plus.OsmandSettings.CommonPreference; import net.osmand.plus.OsmandSettings.CommonPreference;
import net.osmand.plus.OsmandSettings.ListStringPreference; import net.osmand.plus.OsmandSettings.ListStringPreference;
import net.osmand.plus.R; import net.osmand.plus.R;
@ -372,7 +371,7 @@ public class ConfigureMapMenu {
.setTitleId(R.string.shared_string_favorites, activity) .setTitleId(R.string.shared_string_favorites, activity)
.setSelected(settings.SHOW_FAVORITES.get()) .setSelected(settings.SHOW_FAVORITES.get())
.setColor(selected ? R.color.osmand_orange : ContextMenuItem.INVALID_ID) .setColor(selected ? R.color.osmand_orange : ContextMenuItem.INVALID_ID)
.setIcon(R.drawable.ic_action_fav_dark) .setIcon(R.drawable.ic_action_favorite)
.setItemDeleteAction(makeDeleteAction(settings.SHOW_FAVORITES)) .setItemDeleteAction(makeDeleteAction(settings.SHOW_FAVORITES))
.setListener(l) .setListener(l)
.createItem()); .createItem());
@ -443,7 +442,7 @@ public class ConfigureMapMenu {
.setTitleId(R.string.map_markers, activity) .setTitleId(R.string.map_markers, activity)
.setSelected(selected) .setSelected(selected)
.setColor(selected ? R.color.osmand_orange : ContextMenuItem.INVALID_ID) .setColor(selected ? R.color.osmand_orange : ContextMenuItem.INVALID_ID)
.setIcon(R.drawable.ic_action_flag_dark) .setIcon(R.drawable.ic_action_flag)
.setItemDeleteAction(makeDeleteAction(settings.SHOW_MAP_MARKERS)) .setItemDeleteAction(makeDeleteAction(settings.SHOW_MAP_MARKERS))
.setListener(l).createItem()); .setListener(l).createItem());

View file

@ -1257,7 +1257,7 @@ public class ImportHelper {
items.add(new ShortDescriptionItem(txt)); items.add(new ShortDescriptionItem(txt));
BaseBottomSheetItem asFavoritesItem = new SimpleBottomSheetItem.Builder() BaseBottomSheetItem asFavoritesItem = new SimpleBottomSheetItem.Builder()
.setIcon(getContentIcon(R.drawable.ic_action_fav_dark)) .setIcon(getContentIcon(R.drawable.ic_action_favorite))
.setTitle(getString(R.string.import_as_favorites)) .setTitle(getString(R.string.import_as_favorites))
.setLayoutId(R.layout.bottom_sheet_item_simple) .setLayoutId(R.layout.bottom_sheet_item_simple)
.setOnClickListener(new View.OnClickListener() { .setOnClickListener(new View.OnClickListener() {

View file

@ -80,7 +80,7 @@ public class MapMarkerDialogHelper {
.getColor(useCenter ? R.color.color_distance : R.color.color_myloc_distance)); .getColor(useCenter ? R.color.color_distance : R.color.color_myloc_distance));
} else { } else {
waypointIcon.setImageDrawable(app.getUIUtilities() waypointIcon.setImageDrawable(app.getUIUtilities()
.getIcon(R.drawable.ic_action_flag_dark, !nightMode)); .getIcon(R.drawable.ic_action_flag, !nightMode));
AndroidUtils.setTextSecondaryColor(ctx, text, nightMode); AndroidUtils.setTextSecondaryColor(ctx, text, nightMode);
AndroidUtils.setTextSecondaryColor(ctx, textDist, nightMode); AndroidUtils.setTextSecondaryColor(ctx, textDist, nightMode);
} }
@ -114,6 +114,6 @@ public class MapMarkerDialogHelper {
} }
public static Drawable getMapMarkerIcon(OsmandApplication app, int colorIndex) { public static Drawable getMapMarkerIcon(OsmandApplication app, int colorIndex) {
return app.getUIUtilities().getIcon(R.drawable.ic_action_flag_dark, MapMarker.getColorId(colorIndex)); return app.getUIUtilities().getIcon(R.drawable.ic_action_flag, MapMarker.getColorId(colorIndex));
} }
} }

View file

@ -908,8 +908,8 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL
favActionIconId = menuController.getFavActionIconId(); favActionIconId = menuController.getFavActionIconId();
waypointActionIconId = menuController.getWaypointActionIconId(); waypointActionIconId = menuController.getWaypointActionIconId();
} else { } else {
favActionIconId = R.drawable.ic_action_fav_dark; favActionIconId = R.drawable.ic_action_favorite_stroke;
waypointActionIconId = R.drawable.ic_action_flag_dark; waypointActionIconId = R.drawable.ic_action_flag_stroke;
} }
} }

View file

@ -504,7 +504,7 @@ public abstract class MenuController extends BaseMenuController implements Colla
} }
public int getFavActionIconId() { public int getFavActionIconId() {
return R.drawable.ic_action_fav_dark; return R.drawable.ic_action_favorite_stroke;
} }
public int getFavActionStringId() { public int getFavActionStringId() {
@ -516,7 +516,7 @@ public abstract class MenuController extends BaseMenuController implements Colla
} }
public int getWaypointActionIconId() { public int getWaypointActionIconId() {
return R.drawable.ic_action_flag_dark; return R.drawable.ic_action_flag_stroke;
} }
public int getWaypointActionStringId() { public int getWaypointActionStringId() {

View file

@ -119,7 +119,7 @@ public class MapMarkerEditorFragment extends PointEditorFragment {
@Override @Override
public Drawable getNameIcon() { public Drawable getNameIcon() {
return requireMyApplication().getUIUtilities().getIcon(R.drawable.ic_action_flag_dark, getPointColor()); return requireMyApplication().getUIUtilities().getIcon(R.drawable.ic_action_flag, getPointColor());
} }
@Override @Override

View file

@ -49,7 +49,7 @@ public class HistoryMarkerMenuBottomSheetDialogFragment extends MenuBottomSheetD
BaseBottomSheetItem markerItem = new BottomSheetItemWithDescription.Builder() BaseBottomSheetItem markerItem = new BottomSheetItemWithDescription.Builder()
.setDescription(getString(R.string.passed, month + " " + day)) .setDescription(getString(R.string.passed, month + " " + day))
.setIcon(getIcon(R.drawable.ic_action_flag_dark, MapMarker.getColorId(markerColorIndex))) .setIcon(getIcon(R.drawable.ic_action_flag, MapMarker.getColorId(markerColorIndex)))
.setTitle(markerName) .setTitle(markerName)
.setLayoutId(R.layout.bottom_sheet_item_with_descr_56dp) .setLayoutId(R.layout.bottom_sheet_item_with_descr_56dp)
.create(); .create();

View file

@ -27,7 +27,7 @@ public class SelectionMarkersGroupBottomSheetDialogFragment extends MenuBottomSh
items.add(new ShortDescriptionItem(getString(R.string.add_group_descr))); items.add(new ShortDescriptionItem(getString(R.string.add_group_descr)));
BaseBottomSheetItem favoritesItem = new SimpleBottomSheetItem.Builder() BaseBottomSheetItem favoritesItem = new SimpleBottomSheetItem.Builder()
.setIcon(getContentIcon(R.drawable.ic_action_fav_dark)) .setIcon(getContentIcon(R.drawable.ic_action_favorite))
.setTitle(getString(R.string.favourites_group)) .setTitle(getString(R.string.favourites_group))
.setLayoutId(R.layout.bottom_sheet_item_simple) .setLayoutId(R.layout.bottom_sheet_item_simple)
.setOnClickListener(new View.OnClickListener() { .setOnClickListener(new View.OnClickListener() {

View file

@ -96,7 +96,7 @@ public class MapMarkersActiveAdapter extends RecyclerView.Adapter<MapMarkerItemV
} else { } else {
holder.iconDirection.setVisibility(View.VISIBLE); holder.iconDirection.setVisibility(View.VISIBLE);
holder.icon.setImageDrawable(iconsCache.getIcon(R.drawable.ic_action_flag_dark, markerColor)); holder.icon.setImageDrawable(iconsCache.getIcon(R.drawable.ic_action_flag, markerColor));
holder.mainLayout.setBackgroundColor(ContextCompat.getColor(mapActivity, night ? R.color.list_background_color_dark : R.color.list_background_color_light)); holder.mainLayout.setBackgroundColor(ContextCompat.getColor(mapActivity, night ? R.color.list_background_color_dark : R.color.list_background_color_light));
holder.title.setTextColor(ContextCompat.getColor(mapActivity, night ? R.color.text_color_primary_dark : R.color.text_color_primary_light)); holder.title.setTextColor(ContextCompat.getColor(mapActivity, night ? R.color.text_color_primary_dark : R.color.text_color_primary_light));
holder.divider.setBackgroundColor(ContextCompat.getColor(mapActivity, night ? R.color.app_bar_color_dark : R.color.divider_color_light)); holder.divider.setBackgroundColor(ContextCompat.getColor(mapActivity, night ? R.color.app_bar_color_dark : R.color.divider_color_light));

View file

@ -291,7 +291,7 @@ public class MapMarkersGroupsAdapter extends RecyclerView.Adapter<RecyclerView.V
} else { } else {
itemViewHolder.iconDirection.setVisibility(View.VISIBLE); itemViewHolder.iconDirection.setVisibility(View.VISIBLE);
itemViewHolder.icon.setImageDrawable(iconsCache.getIcon(R.drawable.ic_action_flag_dark, color)); itemViewHolder.icon.setImageDrawable(iconsCache.getIcon(R.drawable.ic_action_flag, color));
itemViewHolder.mainLayout.setBackgroundColor(ContextCompat.getColor(mapActivity, night ? R.color.list_background_color_dark : R.color.list_background_color_light)); itemViewHolder.mainLayout.setBackgroundColor(ContextCompat.getColor(mapActivity, night ? R.color.list_background_color_dark : R.color.list_background_color_light));
itemViewHolder.title.setTextColor(ContextCompat.getColor(mapActivity, night ? R.color.text_color_primary_dark : R.color.text_color_primary_light)); itemViewHolder.title.setTextColor(ContextCompat.getColor(mapActivity, night ? R.color.text_color_primary_dark : R.color.text_color_primary_light));
itemViewHolder.divider.setBackgroundColor(ContextCompat.getColor(mapActivity, night ? R.color.app_bar_color_dark : R.color.divider_color_light)); itemViewHolder.divider.setBackgroundColor(ContextCompat.getColor(mapActivity, night ? R.color.app_bar_color_dark : R.color.divider_color_light));

View file

@ -121,7 +121,7 @@ public class MapMarkersHistoryAdapter extends RecyclerView.Adapter<RecyclerView.
int color = night ? R.color.icon_color_default_dark : R.color.icon_color_default_light; int color = night ? R.color.icon_color_default_dark : R.color.icon_color_default_light;
int actionIconColor = night ? R.color.icon_color_primary_dark : R.color.icon_color_primary_light; int actionIconColor = night ? R.color.icon_color_primary_dark : R.color.icon_color_primary_light;
itemViewHolder.icon.setImageDrawable(iconsCache.getIcon(R.drawable.ic_action_flag_dark, color)); itemViewHolder.icon.setImageDrawable(iconsCache.getIcon(R.drawable.ic_action_flag, color));
itemViewHolder.title.setText(marker.getName(app)); itemViewHolder.title.setText(marker.getName(app));

View file

@ -157,7 +157,7 @@ public class MapMarkersListAdapter extends RecyclerView.Adapter<MapMarkerItemVie
if (location != null) { if (location != null) {
holder.icon.setImageDrawable(ContextCompat.getDrawable(mapActivity, R.drawable.ic_action_location_color)); holder.icon.setImageDrawable(ContextCompat.getDrawable(mapActivity, R.drawable.ic_action_location_color));
} else { } else {
int res = start ? R.drawable.ic_action_point_start : (finish ? R.drawable.ic_action_point_destination : R.drawable.ic_action_flag_dark); int res = start ? R.drawable.ic_action_point_start : (finish ? R.drawable.ic_action_point_destination : R.drawable.ic_action_flag);
holder.icon.setImageDrawable(iconsCache.getIcon(res, MapMarker.getColorId(marker.colorIndex))); holder.icon.setImageDrawable(iconsCache.getIcon(res, MapMarker.getColorId(marker.colorIndex)));
} }

View file

@ -399,9 +399,9 @@ public class TrackPointFragment extends OsmandExpandableListFragment implements
final MapMarkersHelper markersHelper = app.getMapMarkersHelper(); final MapMarkersHelper markersHelper = app.getMapMarkersHelper();
final boolean synced = markersHelper.getMarkersGroup(getGpx()) != null; final boolean synced = markersHelper.getMarkersGroup(getGpx()) != null;
createMenuItem(menu, SELECT_MAP_MARKERS_ID, synced ? R.string.remove_from_map_markers createMenuItem(menu, SELECT_MAP_MARKERS_ID, synced ? R.string.remove_from_map_markers
: R.string.shared_string_add_to_map_markers, R.drawable.ic_action_flag_dark, MenuItem.SHOW_AS_ACTION_NEVER); : R.string.shared_string_add_to_map_markers, R.drawable.ic_action_flag, MenuItem.SHOW_AS_ACTION_NEVER);
} }
createMenuItem(menu, SELECT_FAVORITES_ID, R.string.shared_string_add_to_favorites, R.drawable.ic_action_fav_dark, MenuItem.SHOW_AS_ACTION_NEVER); createMenuItem(menu, SELECT_FAVORITES_ID, R.string.shared_string_add_to_favorites, R.drawable.ic_action_favorite, MenuItem.SHOW_AS_ACTION_NEVER);
createMenuItem(menu, DELETE_ID, R.string.shared_string_delete, R.drawable.ic_action_delete_dark, MenuItem.SHOW_AS_ACTION_NEVER); createMenuItem(menu, DELETE_ID, R.string.shared_string_delete, R.drawable.ic_action_delete_dark, MenuItem.SHOW_AS_ACTION_NEVER);
createMenuItem(menu, COORDINATE_INPUT_ID, R.string.coordinate_input, R.drawable.ic_action_coordinates_longitude, MenuItem.SHOW_AS_ACTION_NEVER); createMenuItem(menu, COORDINATE_INPUT_ID, R.string.coordinate_input, R.drawable.ic_action_coordinates_longitude, MenuItem.SHOW_AS_ACTION_NEVER);
} }
@ -566,7 +566,7 @@ public class TrackPointFragment extends OsmandExpandableListFragment implements
public boolean onCreateActionMode(ActionMode mode, Menu menu) { public boolean onCreateActionMode(ActionMode mode, Menu menu) {
setSelectionMode(true); setSelectionMode(true);
createMenuItem(menu, SELECT_FAVORITES_ACTION_MODE_ID, R.string.shared_string_add_to_favorites, createMenuItem(menu, SELECT_FAVORITES_ACTION_MODE_ID, R.string.shared_string_add_to_favorites,
R.drawable.ic_action_fav_dark, R.drawable.ic_action_favorite,
MenuItem.SHOW_AS_ACTION_IF_ROOM); MenuItem.SHOW_AS_ACTION_IF_ROOM);
selectedItems.clear(); selectedItems.clear();
selectedGroups.clear(); selectedGroups.clear();

View file

@ -31,7 +31,7 @@ public class FavoriteAction extends QuickAction {
public static final QuickActionType TYPE = new QuickActionType(3, public static final QuickActionType TYPE = new QuickActionType(3,
"fav.add", FavoriteAction.class). "fav.add", FavoriteAction.class).
nameRes(R.string.quick_action_add_favorite).iconRes(R.drawable.ic_action_fav_dark). nameRes(R.string.quick_action_add_favorite).iconRes(R.drawable.ic_action_favorite).
category(QuickActionType.CREATE_CATEGORY); category(QuickActionType.CREATE_CATEGORY);
public static final String KEY_NAME = "name"; public static final String KEY_NAME = "name";
public static final String KEY_DIALOG = "dialog"; public static final String KEY_DIALOG = "dialog";

View file

@ -24,7 +24,7 @@ public class GPXAction extends QuickAction {
public static final QuickActionType TYPE = new QuickActionType(6, public static final QuickActionType TYPE = new QuickActionType(6,
"gpx.add", GPXAction.class). "gpx.add", GPXAction.class).
nameRes(R.string.quick_action_add_gpx).iconRes(R.drawable.ic_action_flag_dark). nameRes(R.string.quick_action_add_gpx).iconRes(R.drawable.ic_action_flag).
category(QuickActionType.CREATE_CATEGORY); category(QuickActionType.CREATE_CATEGORY);
public static final String KEY_NAME = "name"; public static final String KEY_NAME = "name";

View file

@ -16,7 +16,7 @@ public class MarkerAction extends QuickAction {
public static final QuickActionType TYPE = new QuickActionType(2, public static final QuickActionType TYPE = new QuickActionType(2,
"marker.add", MarkerAction.class). "marker.add", MarkerAction.class).
nameRes(R.string.quick_action_add_marker).iconRes(R.drawable.ic_action_flag_dark).nonEditable(). nameRes(R.string.quick_action_add_marker).iconRes(R.drawable.ic_action_flag).nonEditable().
category(QuickActionType.CREATE_CATEGORY); category(QuickActionType.CREATE_CATEGORY);

View file

@ -8,7 +8,6 @@ import android.widget.TextView;
import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R; import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.audionotes.TakeVideoNoteAction;
import net.osmand.plus.quickaction.QuickAction; import net.osmand.plus.quickaction.QuickAction;
import net.osmand.plus.quickaction.QuickActionType; import net.osmand.plus.quickaction.QuickActionType;
@ -16,7 +15,7 @@ public class ShowHideFavoritesAction extends QuickAction {
public static final QuickActionType TYPE = new QuickActionType(4, public static final QuickActionType TYPE = new QuickActionType(4,
"favorites.showhide", ShowHideFavoritesAction.class). "favorites.showhide", ShowHideFavoritesAction.class).
nameRes(R.string.quick_action_showhide_favorites_title).iconRes(R.drawable.ic_action_fav_dark).nonEditable(). nameRes(R.string.quick_action_showhide_favorites_title).iconRes(R.drawable.ic_action_favorite).nonEditable().
category(QuickActionType.CONFIGURE_MAP); category(QuickActionType.CONFIGURE_MAP);

View file

@ -637,7 +637,7 @@ public class AddPointBottomSheetDialog extends MenuBottomSheetDialogFragment {
ItemViewHolder favoriteViewHolder = (ItemViewHolder) holder; ItemViewHolder favoriteViewHolder = (ItemViewHolder) holder;
if (item.equals(FAVORITES)) { if (item.equals(FAVORITES)) {
favoriteViewHolder.title.setText(R.string.shared_string_favorites); favoriteViewHolder.title.setText(R.string.shared_string_favorites);
favoriteViewHolder.icon.setImageDrawable(getContentIcon(R.drawable.ic_action_fav_dark)); favoriteViewHolder.icon.setImageDrawable(getContentIcon(R.drawable.ic_action_favorite));
favoriteViewHolder.description.setVisibility(View.GONE); favoriteViewHolder.description.setVisibility(View.GONE);
} else { } else {
if (item instanceof FavouritePoint) { if (item instanceof FavouritePoint) {
@ -656,7 +656,7 @@ public class AddPointBottomSheetDialog extends MenuBottomSheetDialogFragment {
favoriteViewHolder.description.setText(point.getCategory()); favoriteViewHolder.description.setText(point.getCategory());
} }
int color = app.getFavorites().getColorWithCategory(point, ContextCompat.getColor(app, R.color.color_favorite)); int color = app.getFavorites().getColorWithCategory(point, ContextCompat.getColor(app, R.color.color_favorite));
favoriteViewHolder.icon.setImageDrawable(app.getUIUtilities().getPaintedIcon(R.drawable.ic_action_fav_dark, color)); favoriteViewHolder.icon.setImageDrawable(app.getUIUtilities().getPaintedIcon(R.drawable.ic_action_favorite, color));
} }
favoriteViewHolder.description.setVisibility(View.VISIBLE); favoriteViewHolder.description.setVisibility(View.VISIBLE);
} }
@ -679,7 +679,7 @@ public class AddPointBottomSheetDialog extends MenuBottomSheetDialogFragment {
ItemViewHolder markerViewHolder = (ItemViewHolder) holder; ItemViewHolder markerViewHolder = (ItemViewHolder) holder;
if (item.equals(MARKERS)) { if (item.equals(MARKERS)) {
markerViewHolder.title.setText(R.string.shared_string_markers); markerViewHolder.title.setText(R.string.shared_string_markers);
markerViewHolder.icon.setImageDrawable(getContentIcon(R.drawable.ic_action_flag_dark)); markerViewHolder.icon.setImageDrawable(getContentIcon(R.drawable.ic_action_flag));
} else { } else {
MapMarker marker = (MapMarker) getItem(position); MapMarker marker = (MapMarker) getItem(position);
markerViewHolder.title.setText(marker.getName(getContext())); markerViewHolder.title.setText(marker.getName(getContext()));

View file

@ -380,7 +380,7 @@ public class QuickSearchListItem {
case FAVORITE_GROUP: case FAVORITE_GROUP:
FavoriteGroup group = (FavoriteGroup) searchResult.object; FavoriteGroup group = (FavoriteGroup) searchResult.object;
int color = group.getColor() == 0 ? ContextCompat.getColor(app, R.color.color_favorite) : group.getColor(); int color = group.getColor() == 0 ? ContextCompat.getColor(app, R.color.color_favorite) : group.getColor();
return app.getUIUtilities().getPaintedIcon(R.drawable.ic_action_fav_dark, color | 0xff000000); return app.getUIUtilities().getPaintedIcon(R.drawable.ic_action_favorite, color | 0xff000000);
case REGION: case REGION:
return getIcon(app, R.drawable.ic_world_globe_dark); return getIcon(app, R.drawable.ic_world_globe_dark);
case RECENT_OBJ: case RECENT_OBJ:

View file

@ -1166,15 +1166,12 @@ public class MapControlsLayer extends OsmandMapLayer {
if (compass) { if (compass) {
((ImageView) iv).setImageDrawable(new CompassDrawable(d)); ((ImageView) iv).setImageDrawable(new CompassDrawable(d));
} else { } else {
int iconSize = (int) ctx.getResources().getDimension(R.dimen.standard_icon_size); int btnSizePx = (iv).getLayoutParams().height;
Bitmap bitmap = Bitmap.createBitmap(iconSize, iconSize, Bitmap.Config.ARGB_8888); int iconSizePx = (int) ctx.getResources().getDimension(R.dimen.standard_icon_size);
Canvas canvas = new Canvas(bitmap); int iconPadding = (btnSizePx - iconSizePx) / 2;
canvas.drawColor(0, PorterDuff.Mode.CLEAR); iv.setPadding(iconPadding, iconPadding, iconPadding, iconPadding);
if (d != null) { ((ImageView) iv).setScaleType(ImageView.ScaleType.FIT_CENTER);
d.setBounds(0, 0, canvas.getWidth(), canvas.getHeight()); ((ImageView) iv).setImageDrawable(d);
d.draw(canvas);
}
((ImageView) iv).setImageDrawable(new BitmapDrawable(ctx.getResources(), bitmap));
} }
} else if (iv instanceof TextView) { } else if (iv instanceof TextView) {
((TextView) iv).setCompoundDrawablesWithIntrinsicBounds( ((TextView) iv).setCompoundDrawablesWithIntrinsicBounds(

View file

@ -203,11 +203,11 @@ public class MapInfoLayer extends OsmandMapLayer {
TextInfoWidget marker = mwf.createMapMarkerControl(map, true); TextInfoWidget marker = mwf.createMapMarkerControl(map, true);
registerSideWidget(marker, R.drawable.ic_action_flag_dark, R.string.map_marker_1st, WIDGET_MARKER_1, false, 17); registerSideWidget(marker, R.drawable.ic_action_flag, R.string.map_marker_1st, WIDGET_MARKER_1, false, 17);
TextInfoWidget bearing = ric.createBearingControl(map); TextInfoWidget bearing = ric.createBearingControl(map);
registerSideWidget(bearing, new BearingWidgetState(app), WIDGET_BEARING, false, 18); registerSideWidget(bearing, new BearingWidgetState(app), WIDGET_BEARING, false, 18);
TextInfoWidget marker2nd = mwf.createMapMarkerControl(map, false); TextInfoWidget marker2nd = mwf.createMapMarkerControl(map, false);
registerSideWidget(marker2nd, R.drawable.ic_action_flag_dark, R.string.map_marker_2nd, WIDGET_MARKER_2, false, 19); registerSideWidget(marker2nd, R.drawable.ic_action_flag, R.string.map_marker_2nd, WIDGET_MARKER_2, false, 19);
TextInfoWidget speed = ric.createSpeedControl(map); TextInfoWidget speed = ric.createSpeedControl(map);
registerSideWidget(speed, R.drawable.ic_action_speed, R.string.map_widget_speed, WIDGET_SPEED, false, 20); registerSideWidget(speed, R.drawable.ic_action_speed, R.string.map_widget_speed, WIDGET_SPEED, false, 20);