Fixed icons color in action bar on light theme
This commit is contained in:
parent
2ff3331ef7
commit
dafddbf041
3 changed files with 20 additions and 9 deletions
|
@ -509,10 +509,10 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
optionsMenuAdapter.item(R.string.local_index_mi_reload)
|
optionsMenuAdapter.item(R.string.local_index_mi_reload)
|
||||||
.iconColor(R.drawable.ic_action_refresh_dark)
|
.icon(R.drawable.ic_action_refresh_dark)
|
||||||
.listen(listener).position(1).reg();
|
.listen(listener).position(1).reg();
|
||||||
optionsMenuAdapter.item(R.string.shared_string_delete)
|
optionsMenuAdapter.item(R.string.shared_string_delete)
|
||||||
.iconColor(R.drawable.ic_action_delete_dark)
|
.icon(R.drawable.ic_action_delete_dark)
|
||||||
.listen(listener).position(2).reg();
|
.listen(listener).position(2).reg();
|
||||||
optionsMenuAdapter.item(R.string.local_index_mi_backup)
|
optionsMenuAdapter.item(R.string.local_index_mi_backup)
|
||||||
.listen(listener).position(3).reg();
|
.listen(listener).position(3).reg();
|
||||||
|
|
|
@ -203,7 +203,7 @@ public class OsmEditingPlugin extends OsmandPlugin {
|
||||||
if (fragment instanceof AvailableGPXFragment) {
|
if (fragment instanceof AvailableGPXFragment) {
|
||||||
final AvailableGPXFragment f = ((AvailableGPXFragment) fragment);
|
final AvailableGPXFragment f = ((AvailableGPXFragment) fragment);
|
||||||
optionsMenuAdapter.item(R.string.local_index_mi_upload_gpx)
|
optionsMenuAdapter.item(R.string.local_index_mi_upload_gpx)
|
||||||
.iconColor(R.drawable.ic_action_export)
|
.icon(R.drawable.ic_action_export)
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -433,10 +433,18 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
|
||||||
actionMode = startSupportActionMode(new ActionMode.Callback() {
|
actionMode = startSupportActionMode(new ActionMode.Callback() {
|
||||||
private OsMoDevice device;
|
private OsMoDevice device;
|
||||||
private OsMoGroup group;
|
private OsMoGroup group;
|
||||||
|
private Menu menu;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
|
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
|
||||||
selectedObject = o;
|
selectedObject = o;
|
||||||
|
boolean portrait = ScreenOrientationHelper.isOrientationPortrait(OsMoGroupsActivity.this);
|
||||||
|
if (portrait) {
|
||||||
|
menu = getClearToolbar(true).getMenu();
|
||||||
|
} else {
|
||||||
|
getClearToolbar(false);
|
||||||
|
}
|
||||||
|
this.menu = menu;
|
||||||
device = (OsMoDevice) (o instanceof OsMoDevice ? o : null);
|
device = (OsMoDevice) (o instanceof OsMoDevice ? o : null);
|
||||||
group = (OsMoGroup) (o instanceof OsMoGroup ? o : null);
|
group = (OsMoGroup) (o instanceof OsMoGroup ? o : null);
|
||||||
MenuItem mi = null;
|
MenuItem mi = null;
|
||||||
|
@ -446,31 +454,31 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
|
||||||
}
|
}
|
||||||
if (device != null && device.getLastLocation() != null) {
|
if (device != null && device.getLastLocation() != null) {
|
||||||
createMenuItem(menu, SHOW_ON_MAP_ID, R.string.shared_string_show_on_map, R.drawable.ic_action_marker_dark,
|
createMenuItem(menu, SHOW_ON_MAP_ID, R.string.shared_string_show_on_map, R.drawable.ic_action_marker_dark,
|
||||||
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
|
MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
|
||||||
}
|
}
|
||||||
createMenuItem(menu, SHARE_ID, R.string.shared_string_share, R.drawable.ic_action_gshare_dark,
|
createMenuItem(menu, SHARE_ID, R.string.shared_string_share, R.drawable.ic_action_gshare_dark,
|
||||||
// there is a bug in Android 4.2 layout
|
// there is a bug in Android 4.2 layout
|
||||||
device != null && device.getLastLocation() != null ? MenuItemCompat.SHOW_AS_ACTION_NEVER : MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
|
device != null && device.getLastLocation() != null ? MenuItemCompat.SHOW_AS_ACTION_NEVER : MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
|
||||||
///
|
///
|
||||||
if (device != null) {
|
if (device != null) {
|
||||||
createMenuItem(menu, SETTINGS_DEV_ID, R.string.shared_string_settings, R.drawable.ic_action_settings_enabled_dark,
|
createMenuItem(menu, SETTINGS_DEV_ID, R.string.shared_string_settings, R.drawable.ic_action_settings_enabled_dark,
|
||||||
// there is a bug in Android 4.2 layout
|
// there is a bug in Android 4.2 layout
|
||||||
device.getLastLocation() != null ? MenuItemCompat.SHOW_AS_ACTION_NEVER : MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
|
device.getLastLocation() != null ? MenuItemCompat.SHOW_AS_ACTION_NEVER : MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
|
||||||
}
|
}
|
||||||
if (device != null && device.getLastLocation() != null) {
|
if (device != null && device.getLastLocation() != null) {
|
||||||
MenuItem menuItem = createMenuItem(menu, TRACK_DEV_ID, R.string.osmo_set_moving_target, R.drawable.ic_action_flage_dark,
|
MenuItem menuItem = createMenuItem(menu, TRACK_DEV_ID, R.string.osmo_set_moving_target, R.drawable.ic_action_flage_dark,
|
||||||
// there is a bug in Android 4.2 layout
|
// there is a bug in Android 4.2 layout
|
||||||
device.getLastLocation() != null ? MenuItemCompat.SHOW_AS_ACTION_NEVER : MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
|
device.getLastLocation() != null ? MenuItemCompat.SHOW_AS_ACTION_NEVER : MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
|
||||||
menuItem.setTitleCondensed(getString(R.string.osmo_follow));
|
menuItem.setTitleCondensed(getString(R.string.osmo_follow));
|
||||||
}
|
}
|
||||||
if (group != null) {
|
if (group != null) {
|
||||||
createMenuItem(menu, GROUP_INFO, R.string.osmo_group_info, R.drawable.ic_action_info_dark,
|
createMenuItem(menu, GROUP_INFO, R.string.osmo_group_info, R.drawable.ic_action_info_dark,
|
||||||
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
|
MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
|
||||||
}
|
}
|
||||||
if ((group != null && !group.isMainGroup()) || (device != null && device.getGroup().isMainGroup())) {
|
if ((group != null && !group.isMainGroup()) || (device != null && device.getGroup().isMainGroup())) {
|
||||||
createMenuItem(menu, DELETE_ACTION_ID, R.string.shared_string_delete,
|
createMenuItem(menu, DELETE_ACTION_ID, R.string.shared_string_delete,
|
||||||
R.drawable.ic_action_delete_dark,
|
R.drawable.ic_action_delete_dark,
|
||||||
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
|
MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -500,6 +508,9 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
|
||||||
public void onDestroyActionMode(ActionMode mode) {
|
public void onDestroyActionMode(ActionMode mode) {
|
||||||
selectedObject = null;
|
selectedObject = null;
|
||||||
refreshList();
|
refreshList();
|
||||||
|
if (ScreenOrientationHelper.isOrientationPortrait(OsMoGroupsActivity.this)){
|
||||||
|
onCreateOptionsMenu(menu);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue