Merge pull request #8959 from osmandapp/Fix_ic_action_fav_icon
Fix ic action fav icon tablet sizes
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.5 KiB |
|
@ -24,7 +24,7 @@
|
|||
android:layout_marginLeft="@dimen/content_padding"
|
||||
android:layout_marginRight="@dimen/content_padding"
|
||||
android:layout_marginTop="@dimen/content_padding"
|
||||
osmand:srcCompat="@drawable/ic_action_fav_dark"
|
||||
osmand:srcCompat="@drawable/ic_action_favorite"
|
||||
android:layout_marginStart="@dimen/content_padding"
|
||||
android:layout_marginEnd="@dimen/content_padding" />
|
||||
|
||||
|
|
|
@ -9,8 +9,7 @@
|
|||
app:contentInsetLeft="0dp"
|
||||
app:contentInsetStart="0dp"
|
||||
app:contentInsetRight="0dp"
|
||||
app:contentInsetEnd="0dp">
|
||||
app:contentInsetStart="0dp"
|
||||
app:contentInsetEnd="0dp"
|
||||
app:theme="@style/ThemeOverlay.AppCompat.ActionBar">
|
||||
|
||||
<LinearLayout
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
android:layout_width="56dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
osmand:srcCompat="@drawable/ic_action_fav_dark"/>
|
||||
osmand:srcCompat="@drawable/ic_action_favorite"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
android:scaleType="centerInside"
|
||||
android:layout_width="@dimen/map_button_shadow_width"
|
||||
android:layout_width="@dimen/map_markers_recycler_view_item_height"
|
||||
android:layout_height="match_parent"
|
||||
tools:src="@drawable/ic_action_fav_dark"
|
||||
tools:src="@drawable/ic_action_favorite"
|
||||
tools:visibility="visible"
|
||||
android:visibility="gone"/>
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/map_button_shadow_width"
|
||||
android:layout_height="@dimen/map_markers_recycler_view_item_height"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
|
@ -34,16 +34,16 @@
|
|||
tools:text="3"
|
||||
android:gravity="center"
|
||||
android:id="@+id/map_marker_number_text_view"
|
||||
android:layout_width="@dimen/map_button_shadow_width"
|
||||
android:layout_height="@dimen/map_button_shadow_width"
|
||||
android:layout_width="@dimen/map_markers_recycler_view_item_height"
|
||||
android:layout_height="@dimen/map_markers_recycler_view_item_height"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/map_marker_reorder_icon"
|
||||
android:layout_width="@dimen/map_button_shadow_width"
|
||||
android:layout_height="@dimen/map_button_shadow_width"
|
||||
android:layout_width="@dimen/map_markers_recycler_view_item_height"
|
||||
android:layout_height="@dimen/map_markers_recycler_view_item_height"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:scaleType="centerInside"
|
||||
android:tint="?attr/secondary_icon_color"
|
||||
|
@ -63,7 +63,7 @@
|
|||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="@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
|
||||
android:layout_width="0dp"
|
||||
|
@ -155,8 +155,8 @@
|
|||
|
||||
<ImageButton
|
||||
android:id="@+id/map_marker_options_button"
|
||||
android:layout_width="@dimen/map_button_shadow_width"
|
||||
android:layout_height="@dimen/map_button_shadow_width"
|
||||
android:layout_width="@dimen/map_markers_recycler_view_item_height"
|
||||
android:layout_height="@dimen/map_markers_recycler_view_item_height"
|
||||
android:focusableInTouchMode="true"
|
||||
tools:background="@drawable/marker_circle_background_dark_with_inset"
|
||||
tools:src="@drawable/ic_action_marker_passed"/>
|
||||
|
@ -186,8 +186,8 @@
|
|||
android:id="@+id/divider"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="@dimen/map_button_shadow_width"
|
||||
android:layout_marginStart="@dimen/map_button_shadow_width"
|
||||
android:layout_marginLeft="@dimen/map_markers_recycler_view_item_height"
|
||||
android:layout_marginStart="@dimen/map_markers_recycler_view_item_height"
|
||||
tools:background="?attr/divider_color"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
android:id="@+id/show_hide_history_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="@dimen/map_button_shadow_width"
|
||||
android:paddingStart="@dimen/map_button_shadow_width"
|
||||
android:paddingLeft="@dimen/map_markers_recycler_view_item_height"
|
||||
android:paddingStart="@dimen/map_markers_recycler_view_item_height"
|
||||
android:textAllCaps="true"
|
||||
android:gravity="center_vertical"
|
||||
tools:text="Show passed"
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/outline"
|
||||
android:layout_width="@dimen/context_menu_buttons_bottom_height"
|
||||
android:layout_height="@dimen/context_menu_buttons_bottom_height"
|
||||
android:layout_width="@dimen/favorites_icon_outline_size"
|
||||
android:layout_height="@dimen/favorites_icon_outline_size"
|
||||
android:visibility="invisible"
|
||||
app:srcCompat="@drawable/bg_point_circle_contour" />
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
android:layout_marginRight="16dp"
|
||||
android:scaleType="centerInside"
|
||||
android:tint="?attr/default_icon_color"
|
||||
osmand:srcCompat="@drawable/ic_action_flag_dark"
|
||||
osmand:srcCompat="@drawable/ic_action_flag"
|
||||
android:layout_marginEnd="16dp" />
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
android:layout_marginTop="2dp"
|
||||
android:scaleType="centerInside"
|
||||
android:tint="?attr/default_icon_color"
|
||||
osmand:srcCompat="@drawable/ic_action_fav_dark"/>
|
||||
osmand:srcCompat="@drawable/ic_action_favorite"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
android:layout_marginTop="2dp"
|
||||
android:scaleType="centerInside"
|
||||
android:tint="?attr/default_icon_color"
|
||||
osmand:srcCompat="@drawable/ic_action_fav_dark"/>
|
||||
osmand:srcCompat="@drawable/ic_action_favorite"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<!--android:scaleType="centerInside"-->
|
||||
<!--android:tint="@color/color_white"-->
|
||||
<!--android:background="?attr/selectableItemBackground"-->
|
||||
<!--app:srcCompat="@drawable/ic_action_flag_dark" />-->
|
||||
<!--app:srcCompat="@drawable/ic_action_flag" />-->
|
||||
<!---->
|
||||
<!--</LinearLayout>-->
|
||||
|
||||
|
@ -51,7 +51,7 @@
|
|||
android:scaleType="centerInside"
|
||||
app:tint="?attr/app_bar_primary_item_color"
|
||||
android:layout_marginTop="24dp"
|
||||
app:srcCompat="@drawable/ic_action_flag_dark"
|
||||
app:srcCompat="@drawable/ic_action_flag"
|
||||
android:layout_marginStart="16dp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
android:layout_marginRight="8dp"
|
||||
android:scaleType="centerInside"
|
||||
android:tint="?attr/default_icon_color"
|
||||
osmand:srcCompat="@drawable/ic_action_flag_dark"
|
||||
osmand:srcCompat="@drawable/ic_action_flag"
|
||||
android:layout_marginEnd="8dp" />
|
||||
|
||||
<LinearLayout
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
osmand:srcCompat="@drawable/ic_action_fav_dark" />
|
||||
osmand:srcCompat="@drawable/ic_action_favorite" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
android:layout_width="56dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
osmand:srcCompat="@drawable/ic_action_fav_dark"/>
|
||||
osmand:srcCompat="@drawable/ic_action_favorite"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
|
|
|
@ -51,7 +51,6 @@
|
|||
<!-- ContextMenu -->
|
||||
<dimen name="context_menu_top_shadow_h">30dp</dimen>
|
||||
<dimen name="context_menu_icon_top_padding">25dp</dimen>
|
||||
<dimen name="context_menu_first_line_top_margin">21dp</dimen>
|
||||
<dimen name="context_menu_first_line_bottom_margin">24dp</dimen>
|
||||
<dimen name="context_menu_second_line_top_margin">6dp</dimen>
|
||||
<dimen name="context_menu_top_right_button_min_width">114dp</dimen>
|
||||
|
@ -110,10 +109,7 @@
|
|||
<dimen name="measurement_tool_button_height">54dp</dimen>
|
||||
|
||||
|
||||
<dimen name="map_markers_recycler_view_padding_bottom">78dp</dimen>
|
||||
<dimen name="map_markers_recycler_view_padding_top">15dp</dimen>
|
||||
<dimen name="shadow_height">8dp</dimen>
|
||||
<dimen name="map_marker_title_height">42dp</dimen>
|
||||
|
||||
<!--Route info-->
|
||||
<dimen name="route_info_buttons_padding_top_bottom">24dp</dimen>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="splash_screen_logo_top">240dp</dimen>
|
||||
<dimen name="splash_screen_logo_top">120dp</dimen>
|
||||
<dimen name="splash_screen_text_bottom">12dp</dimen>
|
||||
<dimen name="splash_screen_osm_text_bottom">24dp</dimen>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="splash_screen_logo_top">400dp</dimen>
|
||||
<dimen name="splash_screen_logo_top">240dp</dimen>
|
||||
<dimen name="splash_screen_text_bottom">36dp</dimen>
|
||||
<dimen name="splash_screen_osm_text_bottom">24dp</dimen>
|
||||
|
||||
|
|
|
@ -73,6 +73,7 @@
|
|||
|
||||
<dimen name="favorites_icon_right_margin">24dp</dimen>
|
||||
<dimen name="favorites_icon_size">40dp</dimen>
|
||||
<dimen name="favorites_icon_outline_size">48dp</dimen>
|
||||
<dimen name="favorites_icon_padding">2dp</dimen>
|
||||
<dimen name="favorites_list_item_height">60dp</dimen>
|
||||
<dimen name="favorites_select_group_button_height">76dp</dimen>
|
||||
|
@ -273,6 +274,7 @@
|
|||
<dimen name="action_bar_image_height">220dp</dimen>
|
||||
<dimen name="action_bar_image_side_margin">70dp</dimen>
|
||||
|
||||
<dimen name="map_markers_recycler_view_item_height">56dp</dimen>
|
||||
<dimen name="map_markers_recycler_view_padding_bottom">52dp</dimen>
|
||||
<dimen name="map_markers_recycler_view_padding_top">10dp</dimen>
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ public class SecondSplashScreenFragment extends BaseOsmAndFragment {
|
|||
private final static int OSM_TEXT_ID = 1003;
|
||||
|
||||
public static final String TAG = "SecondSplashScreenFragment";
|
||||
public static final int MIN_SCREEN_WIDTH_TABLET_DP = 600;
|
||||
public static boolean SHOW = true;
|
||||
public static boolean VISIBLE = false;
|
||||
|
||||
|
@ -57,8 +58,7 @@ public class SecondSplashScreenFragment extends BaseOsmAndFragment {
|
|||
if (!hasNavBar())
|
||||
return 0;
|
||||
int orientation = getResources().getConfiguration().orientation;
|
||||
boolean isSmartphone = getResources().getConfiguration().smallestScreenWidthDp < 600;
|
||||
if (isSmartphone && Configuration.ORIENTATION_LANDSCAPE == orientation)
|
||||
if (isSmartphone() && Configuration.ORIENTATION_LANDSCAPE == orientation)
|
||||
return 0;
|
||||
int id = getResources().getIdentifier(orientation == Configuration.ORIENTATION_PORTRAIT ? "navigation_bar_height" : "navigation_bar_height_landscape", "dimen", "android");
|
||||
if (id > 0)
|
||||
|
@ -70,8 +70,7 @@ public class SecondSplashScreenFragment extends BaseOsmAndFragment {
|
|||
if (!hasNavBar())
|
||||
return 0;
|
||||
int orientation = getResources().getConfiguration().orientation;
|
||||
boolean isSmartphone = getResources().getConfiguration().smallestScreenWidthDp < 600;
|
||||
if (orientation == Configuration.ORIENTATION_LANDSCAPE && isSmartphone) {
|
||||
if (orientation == Configuration.ORIENTATION_LANDSCAPE && isSmartphone()) {
|
||||
int id = getResources().getIdentifier("navigation_bar_width", "dimen", "android");
|
||||
if (id > 0)
|
||||
return getResources().getDimensionPixelSize(id);
|
||||
|
@ -97,9 +96,13 @@ public class SecondSplashScreenFragment extends BaseOsmAndFragment {
|
|||
logo.setImageDrawable(AppCompatResources.getDrawable(activity, R.drawable.ic_logo_splash_osmand_plus));
|
||||
}
|
||||
RelativeLayout.LayoutParams logoLayoutParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
|
||||
logoLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_TOP);
|
||||
logoLayoutParams.addRule(RelativeLayout.CENTER_HORIZONTAL);
|
||||
|
||||
if (isSmartphone()) {
|
||||
logoLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_TOP);
|
||||
logoLayoutParams.addRule(RelativeLayout.CENTER_HORIZONTAL);
|
||||
} else {
|
||||
logoLayoutParams.addRule(RelativeLayout.CENTER_IN_PARENT);
|
||||
}
|
||||
|
||||
ImageView text = new ImageView(activity);
|
||||
text.setId(TEXT_ID);
|
||||
if (Version.isFreeVersion(app)) {
|
||||
|
@ -160,6 +163,10 @@ public class SecondSplashScreenFragment extends BaseOsmAndFragment {
|
|||
return view;
|
||||
}
|
||||
|
||||
private boolean isSmartphone() {
|
||||
return getResources().getConfiguration().smallestScreenWidthDp < MIN_SCREEN_WIDTH_TABLET_DP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
|
|
@ -478,7 +478,7 @@ public class MapMarkersHelper {
|
|||
int type = group.getType();
|
||||
if (type != -1) {
|
||||
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;
|
||||
}
|
||||
header.group = group;
|
||||
|
|
|
@ -179,7 +179,7 @@ public class EditFavoriteGroupDialogFragment extends MenuBottomSheetDialogFragme
|
|||
final boolean synced = markersGr != null;
|
||||
|
||||
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))
|
||||
.setLayoutId(R.layout.bottom_sheet_item_simple)
|
||||
.setOnClickListener(new View.OnClickListener() {
|
||||
|
|
|
@ -387,7 +387,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment implemen
|
|||
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, 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);
|
||||
}
|
||||
}
|
||||
|
@ -414,7 +414,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment implemen
|
|||
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
|
||||
enableSelectionMode(true);
|
||||
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);
|
||||
favoritesSelected.clear();
|
||||
groupsToDelete.clear();
|
||||
|
|
|
@ -349,14 +349,14 @@ public class MapActivityActions implements DialogProvider {
|
|||
adapter.addItem(itemBuilder
|
||||
.setTitleId(selectedObj instanceof FavouritePoint ? R.string.favourites_context_menu_edit : R.string.shared_string_add, mapActivity)
|
||||
.setId(MAP_CONTEXT_MENU_ADD_ID)
|
||||
.setIcon(R.drawable.ic_action_fav_dark)
|
||||
.setIcon(R.drawable.ic_action_favorite_stroke)
|
||||
.setOrder(10)
|
||||
.createItem());
|
||||
adapter.addItem(itemBuilder
|
||||
.setTitleId(R.string.shared_string_marker, mapActivity)
|
||||
.setId(MAP_CONTEXT_MENU_MARKER_ID)
|
||||
.setOrder(20)
|
||||
.setIcon(R.drawable.ic_action_flag_dark)
|
||||
.setIcon(R.drawable.ic_action_flag_stroke)
|
||||
.createItem());
|
||||
adapter.addItem(itemBuilder
|
||||
.setTitleId(R.string.shared_string_share, mapActivity)
|
||||
|
@ -789,7 +789,7 @@ public class MapActivityActions implements DialogProvider {
|
|||
|
||||
optionsMenuHelper.addItem(new ItemBuilder().setTitleId(R.string.map_markers, mapActivity)
|
||||
.setId(DRAWER_MAP_MARKERS_ID)
|
||||
.setIcon(R.drawable.ic_action_flag_dark)
|
||||
.setIcon(R.drawable.ic_action_flag)
|
||||
.setListener(new ItemClickListener() {
|
||||
@Override
|
||||
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
|
||||
|
@ -802,7 +802,7 @@ public class MapActivityActions implements DialogProvider {
|
|||
|
||||
optionsMenuHelper.addItem(new ItemBuilder().setTitleId(R.string.shared_string_my_places, mapActivity)
|
||||
.setId(DRAWER_MY_PLACES_ID)
|
||||
.setIcon(R.drawable.ic_action_fav_dark)
|
||||
.setIcon(R.drawable.ic_action_favorite)
|
||||
.setListener(new ItemClickListener() {
|
||||
@Override
|
||||
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
|
||||
|
|
|
@ -177,7 +177,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
|||
});
|
||||
showOnMapItem.setEnabled(!isNameSearch() || amenityAdapter.getCount() > 0);
|
||||
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);
|
||||
if (!filter.isStandardFilter()) {
|
||||
createMenuItem(omenu, DELETE_FILTER, R.string.shared_string_delete, R.drawable.ic_action_delete_dark,
|
||||
|
|
|
@ -180,7 +180,7 @@ public class DashWaypointsFragment extends DashLocationFragment {
|
|||
MenuItem item;
|
||||
// item = optionsMenu.getMenu().add(
|
||||
// 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() {
|
||||
// @Override
|
||||
// public boolean onMenuItemClick(MenuItem item) {
|
||||
|
|
|
@ -406,8 +406,10 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, IRouteInfo
|
|||
actionButton = new ImageView(mapActivity);
|
||||
int btnSizePx = mapActivity.getResources().getDimensionPixelSize(R.dimen.map_button_size);
|
||||
actionButton.setLayoutParams(getActionButtonLayoutParams(btnSizePx));
|
||||
actionButton.setScaleType(ScaleType.CENTER);
|
||||
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();
|
||||
|
||||
|
||||
|
|
|
@ -383,7 +383,7 @@ public class ConfigureMapMenu {
|
|||
.setTitleId(R.string.shared_string_favorites, activity)
|
||||
.setSelected(settings.SHOW_FAVORITES.get())
|
||||
.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))
|
||||
.setListener(l)
|
||||
.createItem());
|
||||
|
@ -446,7 +446,7 @@ public class ConfigureMapMenu {
|
|||
.setTitleId(R.string.map_markers, activity)
|
||||
.setSelected(selected)
|
||||
.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))
|
||||
.setListener(l).createItem());
|
||||
|
||||
|
|
|
@ -1270,7 +1270,7 @@ public class ImportHelper {
|
|||
items.add(new ShortDescriptionItem(txt));
|
||||
|
||||
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))
|
||||
.setLayoutId(R.layout.bottom_sheet_item_simple)
|
||||
.setOnClickListener(new View.OnClickListener() {
|
||||
|
|
|
@ -80,7 +80,7 @@ public class MapMarkerDialogHelper {
|
|||
.getColor(useCenter ? R.color.color_distance : R.color.color_myloc_distance));
|
||||
} else {
|
||||
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, textDist, nightMode);
|
||||
}
|
||||
|
@ -114,6 +114,6 @@ public class MapMarkerDialogHelper {
|
|||
}
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -908,8 +908,8 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL
|
|||
favActionIconId = menuController.getFavActionIconId();
|
||||
waypointActionIconId = menuController.getWaypointActionIconId();
|
||||
} else {
|
||||
favActionIconId = R.drawable.ic_action_fav_dark;
|
||||
waypointActionIconId = R.drawable.ic_action_flag_dark;
|
||||
favActionIconId = R.drawable.ic_action_favorite_stroke;
|
||||
waypointActionIconId = R.drawable.ic_action_flag_stroke;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -505,7 +505,7 @@ public abstract class MenuController extends BaseMenuController implements Colla
|
|||
}
|
||||
|
||||
public int getFavActionIconId() {
|
||||
return R.drawable.ic_action_fav_dark;
|
||||
return R.drawable.ic_action_favorite_stroke;
|
||||
}
|
||||
|
||||
public int getFavActionStringId() {
|
||||
|
@ -517,7 +517,7 @@ public abstract class MenuController extends BaseMenuController implements Colla
|
|||
}
|
||||
|
||||
public int getWaypointActionIconId() {
|
||||
return R.drawable.ic_action_flag_dark;
|
||||
return R.drawable.ic_action_flag_stroke;
|
||||
}
|
||||
|
||||
public int getWaypointActionStringId() {
|
||||
|
|
|
@ -119,7 +119,7 @@ public class MapMarkerEditorFragment extends PointEditorFragment {
|
|||
|
||||
@Override
|
||||
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
|
||||
|
|
|
@ -49,7 +49,7 @@ public class HistoryMarkerMenuBottomSheetDialogFragment extends MenuBottomSheetD
|
|||
|
||||
BaseBottomSheetItem markerItem = new BottomSheetItemWithDescription.Builder()
|
||||
.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)
|
||||
.setLayoutId(R.layout.bottom_sheet_item_with_descr_56dp)
|
||||
.create();
|
||||
|
|
|
@ -27,7 +27,7 @@ public class SelectionMarkersGroupBottomSheetDialogFragment extends MenuBottomSh
|
|||
items.add(new ShortDescriptionItem(getString(R.string.add_group_descr)));
|
||||
|
||||
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))
|
||||
.setLayoutId(R.layout.bottom_sheet_item_simple)
|
||||
.setOnClickListener(new View.OnClickListener() {
|
||||
|
|
|
@ -97,7 +97,7 @@ public class MapMarkersActiveAdapter extends RecyclerView.Adapter<MapMarkerItemV
|
|||
} else {
|
||||
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.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));
|
||||
|
|
|
@ -292,7 +292,7 @@ public class MapMarkersGroupsAdapter extends RecyclerView.Adapter<RecyclerView.V
|
|||
} else {
|
||||
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.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));
|
||||
|
|
|
@ -122,7 +122,7 @@ public class MapMarkersHistoryAdapter extends RecyclerView.Adapter<RecyclerView.
|
|||
|
||||
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;
|
||||
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));
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ public class MapMarkersListAdapter extends RecyclerView.Adapter<MapMarkerItemVie
|
|||
if (location != null) {
|
||||
holder.icon.setImageDrawable(AppCompatResources.getDrawable(mapActivity, R.drawable.ic_action_location_color));
|
||||
} 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)));
|
||||
}
|
||||
|
||||
|
|
|
@ -399,9 +399,9 @@ public class TrackPointFragment extends OsmandExpandableListFragment implements
|
|||
final MapMarkersHelper markersHelper = app.getMapMarkersHelper();
|
||||
final boolean synced = markersHelper.getMarkersGroup(getGpx()) != null;
|
||||
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, 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) {
|
||||
setSelectionMode(true);
|
||||
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);
|
||||
selectedItems.clear();
|
||||
selectedGroups.clear();
|
||||
|
|
|
@ -31,7 +31,7 @@ public class FavoriteAction extends QuickAction {
|
|||
|
||||
public static final QuickActionType TYPE = new QuickActionType(3,
|
||||
"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);
|
||||
public static final String KEY_NAME = "name";
|
||||
public static final String KEY_DIALOG = "dialog";
|
||||
|
|
|
@ -24,7 +24,7 @@ public class GPXAction extends QuickAction {
|
|||
|
||||
public static final QuickActionType TYPE = new QuickActionType(6,
|
||||
"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);
|
||||
|
||||
public static final String KEY_NAME = "name";
|
||||
|
|
|
@ -16,7 +16,7 @@ public class MarkerAction extends QuickAction {
|
|||
|
||||
public static final QuickActionType TYPE = new QuickActionType(2,
|
||||
"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);
|
||||
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ import android.widget.TextView;
|
|||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.audionotes.TakeVideoNoteAction;
|
||||
import net.osmand.plus.quickaction.QuickAction;
|
||||
import net.osmand.plus.quickaction.QuickActionType;
|
||||
|
||||
|
@ -16,7 +15,7 @@ public class ShowHideFavoritesAction extends QuickAction {
|
|||
|
||||
public static final QuickActionType TYPE = new QuickActionType(4,
|
||||
"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);
|
||||
|
||||
|
||||
|
|
|
@ -639,7 +639,7 @@ public class AddPointBottomSheetDialog extends MenuBottomSheetDialogFragment {
|
|||
ItemViewHolder favoriteViewHolder = (ItemViewHolder) holder;
|
||||
if (item.equals(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);
|
||||
} else {
|
||||
if (item instanceof FavouritePoint) {
|
||||
|
@ -658,7 +658,7 @@ public class AddPointBottomSheetDialog extends MenuBottomSheetDialogFragment {
|
|||
favoriteViewHolder.description.setText(point.getCategory());
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
@ -681,7 +681,7 @@ public class AddPointBottomSheetDialog extends MenuBottomSheetDialogFragment {
|
|||
ItemViewHolder markerViewHolder = (ItemViewHolder) holder;
|
||||
if (item.equals(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 {
|
||||
MapMarker marker = (MapMarker) getItem(position);
|
||||
markerViewHolder.title.setText(marker.getName(getContext()));
|
||||
|
|
|
@ -380,7 +380,7 @@ public class QuickSearchListItem {
|
|||
case FAVORITE_GROUP:
|
||||
FavoriteGroup group = (FavoriteGroup) searchResult.object;
|
||||
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:
|
||||
return getIcon(app, R.drawable.ic_world_globe_dark);
|
||||
case RECENT_OBJ:
|
||||
|
|
|
@ -1166,15 +1166,12 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
if (compass) {
|
||||
((ImageView) iv).setImageDrawable(new CompassDrawable(d));
|
||||
} else {
|
||||
int iconSize = (int) ctx.getResources().getDimension(R.dimen.standard_icon_size);
|
||||
Bitmap bitmap = Bitmap.createBitmap(iconSize, iconSize, Bitmap.Config.ARGB_8888);
|
||||
Canvas canvas = new Canvas(bitmap);
|
||||
canvas.drawColor(0, PorterDuff.Mode.CLEAR);
|
||||
if (d != null) {
|
||||
d.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
|
||||
d.draw(canvas);
|
||||
}
|
||||
((ImageView) iv).setImageDrawable(new BitmapDrawable(ctx.getResources(), bitmap));
|
||||
int btnSizePx = (iv).getLayoutParams().height;
|
||||
int iconSizePx = (int) ctx.getResources().getDimension(R.dimen.map_widget_icon);
|
||||
int iconPadding = (btnSizePx - iconSizePx) / 2;
|
||||
iv.setPadding(iconPadding, iconPadding, iconPadding, iconPadding);
|
||||
((ImageView) iv).setScaleType(ImageView.ScaleType.FIT_CENTER);
|
||||
((ImageView) iv).setImageDrawable(d);
|
||||
}
|
||||
} else if (iv instanceof TextView) {
|
||||
((TextView) iv).setCompoundDrawablesWithIntrinsicBounds(
|
||||
|
|
|
@ -203,11 +203,11 @@ public class MapInfoLayer extends OsmandMapLayer {
|
|||
|
||||
|
||||
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);
|
||||
registerSideWidget(bearing, new BearingWidgetState(app), WIDGET_BEARING, false, 18);
|
||||
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);
|
||||
registerSideWidget(speed, R.drawable.ic_action_speed, R.string.map_widget_speed, WIDGET_SPEED, false, 20);
|
||||
|
|