Styled actionMode
This commit is contained in:
parent
537b9374dc
commit
97c170cb90
4 changed files with 7 additions and 5 deletions
|
@ -74,6 +74,8 @@
|
|||
<item name="pstsUnderlineColor">@color/actionbar_light_color</item>
|
||||
<item name="pstsIndicatorColor">@color/color_white</item>
|
||||
<item name="pstsTextColor">@color/color_white</item>
|
||||
<item name="android:actionModeBackground">@color/actionbar_light_color</item>
|
||||
<item name="actionModeBackground">@color/actionbar_light_color</item>
|
||||
<item name="actionBarStyle">@style/Widget.Styled.ActionBarLight</item>
|
||||
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBarLight</item>
|
||||
</style>
|
||||
|
|
|
@ -172,7 +172,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
|
|||
} else if (itemId == R.string.show_gpx_route) {
|
||||
openShowOnMapMode();
|
||||
} else if (itemId == R.string.local_index_mi_delete) {
|
||||
openSelectionMode(itemId, R.drawable.ic_action_delete_dark, R.drawable.ic_action_delete_light,
|
||||
openSelectionMode(itemId, R.drawable.ic_action_delete_dark, R.drawable.ic_action_delete_dark,
|
||||
new DialogInterface.OnClickListener() {
|
||||
|
||||
@Override
|
||||
|
@ -278,7 +278,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
|
|||
enableSelectionMode(true);
|
||||
updateSelectionMode(mode);
|
||||
MenuItem it = menu.add(R.string.show_gpx_route);
|
||||
it.setIcon(!isLightActionBar() ? R.drawable.ic_action_map_marker_dark : R.drawable.ic_action_map_marker_light);
|
||||
it.setIcon(!isLightActionBar() ? R.drawable.ic_action_map_marker_dark : R.drawable.ic_action_map_marker_dark);
|
||||
MenuItemCompat.setShowAsAction(it, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -430,7 +430,7 @@ public class FavouritesTreeFragment extends OsmandExpandableListFragment {
|
|||
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
|
||||
enableSelectionMode(true);
|
||||
createMenuItem(menu, DELETE_ACTION_ID, R.string.default_buttons_delete,
|
||||
R.drawable.ic_action_delete_light, R.drawable.ic_action_delete_dark,
|
||||
R.drawable.ic_action_delete_dark, R.drawable.ic_action_delete_dark,
|
||||
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
|
||||
favoritesSelected.clear();
|
||||
groupsToDelete.clear();
|
||||
|
|
|
@ -183,13 +183,13 @@ public class OsmEditingPlugin extends OsmandPlugin {
|
|||
if (fragment instanceof AvailableGPXFragment) {
|
||||
final AvailableGPXFragment f = ((AvailableGPXFragment) fragment);
|
||||
optionsMenuAdapter.item(R.string.local_index_mi_upload_gpx)
|
||||
.icons(R.drawable.ic_action_gup_dark, R.drawable.ic_action_gup_light)
|
||||
.icon(R.drawable.ic_action_gup_dark)
|
||||
.listen(new OnContextMenuClick() {
|
||||
|
||||
@Override
|
||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||
f.openSelectionMode(R.string.local_index_mi_upload_gpx, R.drawable.ic_action_gup_dark,
|
||||
R.drawable.ic_action_gup_light, new OnClickListener() {
|
||||
R.drawable.ic_action_gup_dark, new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
List<GpxInfo> selectedItems = f.getSelectedItems();
|
||||
|
|
Loading…
Reference in a new issue