Update icons'
BIN
OsmAnd/res/drawable-hdpi/ic_action_altitude.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
OsmAnd/res/drawable-hdpi/ic_action_gps_info.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-hdpi/ic_action_intermediate.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-hdpi/ic_action_max_speed.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
OsmAnd/res/drawable-hdpi/ic_action_next_turn.png
Normal file
After Width: | Height: | Size: 912 B |
BIN
OsmAnd/res/drawable-hdpi/ic_action_osmo.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
OsmAnd/res/drawable-hdpi/ic_action_speed.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-hdpi/ic_action_target.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
OsmAnd/res/drawable-hdpi/ic_action_time.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-hdpi/ic_action_time_to_distance.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
|
@ -34,7 +34,6 @@ import net.osmand.plus.TargetPointsHelper;
|
||||||
import net.osmand.plus.activities.actions.OsmAndDialogs;
|
import net.osmand.plus.activities.actions.OsmAndDialogs;
|
||||||
import net.osmand.plus.activities.actions.ShareLocation;
|
import net.osmand.plus.activities.actions.ShareLocation;
|
||||||
import net.osmand.plus.activities.search.SearchActivity;
|
import net.osmand.plus.activities.search.SearchActivity;
|
||||||
import net.osmand.plus.development.OsmandDevelopmentPlugin;
|
|
||||||
import net.osmand.plus.dialogs.ConfigureMapMenu;
|
import net.osmand.plus.dialogs.ConfigureMapMenu;
|
||||||
import net.osmand.plus.dialogs.FavoriteDialogs;
|
import net.osmand.plus.dialogs.FavoriteDialogs;
|
||||||
import net.osmand.plus.helpers.WaypointDialogHelper;
|
import net.osmand.plus.helpers.WaypointDialogHelper;
|
||||||
|
@ -293,28 +292,24 @@ public class MapActivityActions implements DialogProvider {
|
||||||
final ContextMenuAdapter adapter = iadapter == null ? new ContextMenuAdapter(mapActivity) : iadapter;
|
final ContextMenuAdapter adapter = iadapter == null ? new ContextMenuAdapter(mapActivity) : iadapter;
|
||||||
|
|
||||||
if(!mapActivity.getRoutingHelper().isFollowingMode() && !mapActivity.getRoutingHelper().isRoutePlanningMode()) {
|
if(!mapActivity.getRoutingHelper().isFollowingMode() && !mapActivity.getRoutingHelper().isRoutePlanningMode()) {
|
||||||
adapter.item(R.string.context_menu_item_directions_to).icons(
|
adapter.item(R.string.context_menu_item_directions_to).iconColor(
|
||||||
R.drawable.ic_action_gdirections_dark, R.drawable.ic_action_gdirections_light).reg();
|
R.drawable.ic_action_gdirections_dark).reg();
|
||||||
adapter.item(R.string.context_menu_item_directions_from).icons(
|
adapter.item(R.string.context_menu_item_directions_from).iconColor(
|
||||||
R.drawable.ic_action_gdirections_dark, R.drawable.ic_action_gdirections_light).reg();
|
R.drawable.ic_action_gdirections_dark).reg();
|
||||||
}
|
}
|
||||||
final TargetPointsHelper targets = getMyApplication().getTargetPointsHelper();
|
final TargetPointsHelper targets = getMyApplication().getTargetPointsHelper();
|
||||||
if(targets.getPointToNavigate() != null) {
|
if(targets.getPointToNavigate() != null) {
|
||||||
adapter.item(R.string.context_menu_item_destination_point).icons(R.drawable.ic_action_flag_dark,
|
adapter.item(R.string.context_menu_item_destination_point).iconColor(R.drawable.ic_action_flag_dark).reg();
|
||||||
R.drawable.ic_action_flag_light).reg();
|
adapter.item(R.string.context_menu_item_intermediate_point).iconColor(R.drawable.ic_action_flage_dark).reg();
|
||||||
adapter.item(R.string.context_menu_item_intermediate_point).icons(R.drawable.ic_action_flage_dark,
|
|
||||||
R.drawable.ic_action_flage_light).reg();
|
|
||||||
// For button-less search UI
|
// For button-less search UI
|
||||||
} else {
|
} else {
|
||||||
adapter.item(R.string.context_menu_item_destination_point).icons(R.drawable.ic_action_flag_dark,
|
adapter.item(R.string.context_menu_item_destination_point).iconColor(R.drawable.ic_action_flag_dark).reg();
|
||||||
R.drawable.ic_action_flag_light).reg();
|
|
||||||
}
|
}
|
||||||
adapter.item(R.string.context_menu_item_search).icons(R.drawable.ic_action_search_dark,
|
adapter.item(R.string.context_menu_item_search).iconColor(R.drawable.ic_action_search_dark).reg();
|
||||||
R.drawable.ic_action_search_light).reg();
|
adapter.item(R.string.context_menu_item_share_location).iconColor(
|
||||||
adapter.item(R.string.context_menu_item_share_location).icons(
|
R.drawable.ic_action_gshare_dark).reg();
|
||||||
R.drawable.ic_action_gshare_dark, R.drawable.ic_action_gshare_light).reg();
|
adapter.item(R.string.shared_string_add_to_favorites).iconColor(
|
||||||
adapter.item(R.string.shared_string_add_to_favorites).icons(
|
R.drawable.ic_action_fav_dark).reg();
|
||||||
R.drawable.ic_action_fav_dark, R.drawable.ic_action_fav_light ).reg();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -656,15 +651,12 @@ public class MapActivityActions implements DialogProvider {
|
||||||
boolean mute = routingHelper.getVoiceRouter().isMute();
|
boolean mute = routingHelper.getVoiceRouter().isMute();
|
||||||
int t = mute ? R.string.menu_mute_on : R.string.menu_mute_off;
|
int t = mute ? R.string.menu_mute_on : R.string.menu_mute_off;
|
||||||
int icon;
|
int icon;
|
||||||
int iconLight;
|
|
||||||
if(mute) {
|
if(mute) {
|
||||||
icon = R.drawable.a_10_device_access_volume_muted_dark;
|
icon = R.drawable.a_10_device_access_volume_muted_dark;
|
||||||
iconLight = R.drawable.a_10_device_access_volume_muted_light;
|
|
||||||
} else{
|
} else{
|
||||||
icon = R.drawable.a_10_device_access_volume_on_dark;
|
icon = R.drawable.a_10_device_access_volume_on_dark;
|
||||||
iconLight = R.drawable.a_10_device_access_volume_on_light;
|
|
||||||
}
|
}
|
||||||
optionsMenuHelper.item(t).icons(icon, iconLight)
|
optionsMenuHelper.item(t).iconColor(icon)
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
|
@ -675,7 +667,7 @@ public class MapActivityActions implements DialogProvider {
|
||||||
}
|
}
|
||||||
if(!routingHelper.isFollowingMode() && !routingHelper.isRoutePlanningMode()) {
|
if(!routingHelper.isFollowingMode() && !routingHelper.isRoutePlanningMode()) {
|
||||||
optionsMenuHelper.item(R.string.get_directions)
|
optionsMenuHelper.item(R.string.get_directions)
|
||||||
.icons(R.drawable.ic_action_gdirections_dark, R.drawable.ic_action_gdirections_light)
|
.iconColor(R.drawable.ic_action_gdirections_dark)
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
|
@ -687,7 +679,7 @@ public class MapActivityActions implements DialogProvider {
|
||||||
optionsMenuHelper.item(
|
optionsMenuHelper.item(
|
||||||
routingHelper.isRoutePlanningMode() ? R.string.continue_navigation :
|
routingHelper.isRoutePlanningMode() ? R.string.continue_navigation :
|
||||||
R.string.pause_navigation)
|
R.string.pause_navigation)
|
||||||
.icons(R.drawable.ic_action_gdirections_dark, R.drawable.ic_action_gdirections_light)
|
.iconColor(R.drawable.ic_action_gdirections_dark)
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
|
@ -714,7 +706,7 @@ public class MapActivityActions implements DialogProvider {
|
||||||
} else {
|
} else {
|
||||||
nav = R.string.clear_destination;
|
nav = R.string.clear_destination;
|
||||||
}
|
}
|
||||||
optionsMenuHelper.item(nav).icons(R.drawable.ic_action_remove_dark, R.drawable.ic_action_remove_light)
|
optionsMenuHelper.item(nav).iconColor(R.drawable.ic_action_remove_dark)
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
|
@ -728,7 +720,7 @@ public class MapActivityActions implements DialogProvider {
|
||||||
}).reg();
|
}).reg();
|
||||||
}
|
}
|
||||||
if (getTargets().getPointToNavigate() != null) {
|
if (getTargets().getPointToNavigate() != null) {
|
||||||
optionsMenuHelper.item(R.string.target_points).icons(R.drawable.ic_action_flage_dark, R.drawable.ic_action_flage_light)
|
optionsMenuHelper.item(R.string.target_points).iconColor(R.drawable.ic_action_flage_dark)
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos,
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos,
|
||||||
|
@ -752,7 +744,7 @@ public class MapActivityActions implements DialogProvider {
|
||||||
|
|
||||||
// 5-9. Default actions (Layers, Configure Map screen, Settings, Search, Favorites)
|
// 5-9. Default actions (Layers, Configure Map screen, Settings, Search, Favorites)
|
||||||
optionsMenuHelper.item(R.string.search_button)
|
optionsMenuHelper.item(R.string.search_button)
|
||||||
.icons(R.drawable.ic_action_search_dark, R.drawable.ic_action_search_light)
|
.iconColor(R.drawable.ic_action_search_dark)
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
|
@ -769,7 +761,7 @@ public class MapActivityActions implements DialogProvider {
|
||||||
}).reg();
|
}).reg();
|
||||||
|
|
||||||
optionsMenuHelper.item(R.string.shared_string_my_places)
|
optionsMenuHelper.item(R.string.shared_string_my_places)
|
||||||
.icons(R.drawable.ic_action_fav_dark, R.drawable.ic_action_fav_light).listen(new OnContextMenuClick() {
|
.iconColor(R.drawable.ic_action_fav_dark).listen(new OnContextMenuClick() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
Intent newIntent = new Intent(mapActivity, mapActivity.getMyApplication().getAppCustomization()
|
Intent newIntent = new Intent(mapActivity, mapActivity.getMyApplication().getAppCustomization()
|
||||||
|
@ -782,7 +774,7 @@ public class MapActivityActions implements DialogProvider {
|
||||||
|
|
||||||
|
|
||||||
optionsMenuHelper.item(R.string.show_point_options)
|
optionsMenuHelper.item(R.string.show_point_options)
|
||||||
.icons(R.drawable.ic_action_marker_dark, R.drawable.ic_action_marker_light)
|
.iconColor(R.drawable.ic_action_marker_dark)
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
|
@ -791,7 +783,7 @@ public class MapActivityActions implements DialogProvider {
|
||||||
}
|
}
|
||||||
}).reg();
|
}).reg();
|
||||||
|
|
||||||
optionsMenuHelper.item(R.string.configure_map).icons(R.drawable.ic_action_layers_dark, R.drawable.ic_action_layers_light)
|
optionsMenuHelper.item(R.string.configure_map).iconColor(R.drawable.ic_action_layers_dark)
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
|
@ -800,7 +792,7 @@ public class MapActivityActions implements DialogProvider {
|
||||||
}
|
}
|
||||||
}).reg();
|
}).reg();
|
||||||
|
|
||||||
optionsMenuHelper.item(R.string.layer_map_appearance).icons(R.drawable.ic_configure_screen_dark, R.drawable.ic_configure_screen_light)
|
optionsMenuHelper.item(R.string.layer_map_appearance).iconColor(R.drawable.ic_configure_screen_dark)
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
|
@ -810,7 +802,7 @@ public class MapActivityActions implements DialogProvider {
|
||||||
}).reg();
|
}).reg();
|
||||||
|
|
||||||
optionsMenuHelper.item(R.string.shared_string_settings)
|
optionsMenuHelper.item(R.string.shared_string_settings)
|
||||||
.icons(R.drawable.ic_action_settings_enabled_dark, R.drawable.ic_action_settings_enabled_light)
|
.iconColor(R.drawable.ic_action_settings_enabled_dark)
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
|
@ -822,7 +814,7 @@ public class MapActivityActions implements DialogProvider {
|
||||||
|
|
||||||
//////////// Others
|
//////////// Others
|
||||||
OsmandPlugin.registerOptionsMenu(mapActivity, optionsMenuHelper);
|
OsmandPlugin.registerOptionsMenu(mapActivity, optionsMenuHelper);
|
||||||
optionsMenuHelper.item(R.string.shared_string_exit).icons(R.drawable.ic_action_quit_dark, R.drawable.ic_action_quit_light )
|
optionsMenuHelper.item(R.string.shared_string_exit).icon(R.drawable.ic_action_quit_dark )
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
|
|
|
@ -133,14 +133,14 @@ public class AudioNotesLayer extends OsmandMapLayer implements IContextMenuProvi
|
||||||
|
|
||||||
};
|
};
|
||||||
if(r.isPhoto()) {
|
if(r.isPhoto()) {
|
||||||
adapter.item(R.string.recording_context_menu_show).icons(
|
adapter.item(R.string.recording_context_menu_show).iconColor(
|
||||||
R.drawable.ic_action_eye_dark, R.drawable.ic_action_eye_light).listen(listener).reg();
|
R.drawable.ic_action_eye_dark).listen(listener).reg();
|
||||||
} else {
|
} else {
|
||||||
adapter.item(R.string.recording_context_menu_play).icons(
|
adapter.item(R.string.recording_context_menu_play).iconColor(
|
||||||
R.drawable.ic_action_play_dark, R.drawable.ic_action_play_light).listen(listener).reg();
|
R.drawable.ic_action_play_dark).listen(listener).reg();
|
||||||
}
|
}
|
||||||
adapter.item(R.string.recording_context_menu_delete).icons(R.drawable.ic_action_delete_dark,
|
adapter.item(R.string.recording_context_menu_delete).iconColor(R.drawable.ic_action_delete_dark
|
||||||
R.drawable.ic_action_delete_light).listen(listener).reg();
|
).listen(listener).reg();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -466,13 +466,13 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
adapter.item(R.string.layer_recordings).selected(SHOW_RECORDINGS.get() ? 1 : 0)
|
adapter.item(R.string.layer_recordings).selected(SHOW_RECORDINGS.get() ? 1 : 0)
|
||||||
.icons(R.drawable.ic_action_audio_dark, R.drawable.ic_action_audio_light).listen(listener).position(12).reg();
|
.iconColor(R.drawable.ic_action_audio_dark).listen(listener).position(12).reg();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerMapContextMenuActions(final MapActivity mapActivity, final double latitude, final double longitude,
|
public void registerMapContextMenuActions(final MapActivity mapActivity, final double latitude, final double longitude,
|
||||||
ContextMenuAdapter adapter, Object selectedObj) {
|
ContextMenuAdapter adapter, Object selectedObj) {
|
||||||
adapter.item(R.string.recording_context_menu_arecord).icons(R.drawable.ic_action_micro_dark, R.drawable.ic_action_micro_light)
|
adapter.item(R.string.recording_context_menu_arecord).iconColor(R.drawable.ic_action_micro_dark)
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -481,7 +481,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}).position(6).reg();
|
}).position(6).reg();
|
||||||
adapter.item(R.string.recording_context_menu_vrecord).icons(R.drawable.ic_action_video_dark, R.drawable.ic_action_video_light)
|
adapter.item(R.string.recording_context_menu_vrecord).iconColor(R.drawable.ic_action_video_dark)
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -490,7 +490,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}).position(7).reg();
|
}).position(7).reg();
|
||||||
adapter.item(R.string.recording_context_menu_precord).icons(R.drawable.ic_action_photo_dark, R.drawable.ic_action_photo_light)
|
adapter.item(R.string.recording_context_menu_precord).iconColor(R.drawable.ic_action_photo_dark)
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
|
@ -520,7 +520,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
||||||
recordControl = new TextInfoWidget(activity);
|
recordControl = new TextInfoWidget(activity);
|
||||||
recordControl.setImageDrawable(activity.getResources().getDrawable(R.drawable.monitoring_rec_inactive));
|
recordControl.setImageDrawable(activity.getResources().getDrawable(R.drawable.monitoring_rec_inactive));
|
||||||
setRecordListener(recordControl, activity);
|
setRecordListener(recordControl, activity);
|
||||||
mapInfoLayer.registerSideWidget(recordControl, R.drawable.widget_icon_av_inactive, R.drawable.widget_icon_av_inactive,
|
mapInfoLayer.registerSideWidget(recordControl, R.drawable.ic_action_audio_dark, R.drawable.widget_icon_av_inactive,
|
||||||
R.string.map_widget_av_notes, "audionotes", false, 22);
|
R.string.map_widget_av_notes, "audionotes", false, 22);
|
||||||
mapInfoLayer.recreateControls();
|
mapInfoLayer.recreateControls();
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class ConfigureMapMenu {
|
||||||
public ContextMenuAdapter createListAdapter(final MapActivity ma, final boolean advanced) {
|
public ContextMenuAdapter createListAdapter(final MapActivity ma, final boolean advanced) {
|
||||||
ContextMenuAdapter adapter = new ContextMenuAdapter(ma, allModes);
|
ContextMenuAdapter adapter = new ContextMenuAdapter(ma, allModes);
|
||||||
adapter.setDefaultLayoutId(R.layout.drawer_list_item);
|
adapter.setDefaultLayoutId(R.layout.drawer_list_item);
|
||||||
adapter.item(R.string.configure_map).icons(R.drawable.ic_back_drawer_dark, R.drawable.ic_back_drawer_white)
|
adapter.item(R.string.configure_map).iconColor(R.drawable.ic_back_drawer_dark)
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -64,7 +64,7 @@ public class ConfigureMapMenu {
|
||||||
|
|
||||||
createLayersItems(adapter, ma);
|
createLayersItems(adapter, ma);
|
||||||
if (!advanced){
|
if (!advanced){
|
||||||
adapter.item(R.string.btn_advanced_mode).icons(R.drawable.ic_action_settings_enabled_dark, R.drawable.ic_action_settings_enabled_light)
|
adapter.item(R.string.btn_advanced_mode).iconColor(R.drawable.ic_action_settings_enabled_dark)
|
||||||
.selected(advanced ? 1 : 0)
|
.selected(advanced ? 1 : 0)
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -170,19 +170,18 @@ public class ConfigureMapMenu {
|
||||||
adapter.item(R.string.shared_string_show).setCategory(true).layout(R.layout.drawer_list_sub_header).reg();
|
adapter.item(R.string.shared_string_show).setCategory(true).layout(R.layout.drawer_list_sub_header).reg();
|
||||||
// String appMode = " [" + settings.getApplicationMode().toHumanString(view.getApplication()) +"] ";
|
// String appMode = " [" + settings.getApplicationMode().toHumanString(view.getApplication()) +"] ";
|
||||||
adapter.item(R.string.layer_poi).selected(settings.SHOW_POI_OVER_MAP.get() ? 1 : 0)
|
adapter.item(R.string.layer_poi).selected(settings.SHOW_POI_OVER_MAP.get() ? 1 : 0)
|
||||||
.icons(R.drawable.ic_action_info_dark, R.drawable.ic_action_info_light).listen(l).reg();
|
.iconColor(R.drawable.ic_action_info_dark).listen(l).reg();
|
||||||
adapter.item(R.string.layer_amenity_label).selected(settings.SHOW_POI_LABEL.get() ? 1 : 0)
|
adapter.item(R.string.layer_amenity_label).selected(settings.SHOW_POI_LABEL.get() ? 1 : 0)
|
||||||
.icons(R.drawable.ic_action_text_dark, R.drawable.ic_action_text_light).listen(l).reg();
|
.iconColor(R.drawable.ic_action_text_dark).listen(l).reg();
|
||||||
adapter.item(R.string.shared_string_favorites).selected(settings.SHOW_FAVORITES.get() ? 1 : 0)
|
adapter.item(R.string.shared_string_favorites).selected(settings.SHOW_FAVORITES.get() ? 1 : 0)
|
||||||
.icons(R.drawable.ic_action_fav_dark, R.drawable.ic_action_fav_light).listen(l).reg();
|
.iconColor(R.drawable.ic_action_fav_dark).listen(l).reg();
|
||||||
adapter.item(R.string.layer_gpx_layer).selected(
|
adapter.item(R.string.layer_gpx_layer).selected(
|
||||||
app.getSelectedGpxHelper().isShowingAnyGpxFiles() ? 1 : 0)
|
app.getSelectedGpxHelper().isShowingAnyGpxFiles() ? 1 : 0)
|
||||||
// .icons(R.drawable.ic_action_foot_dark, R.drawable.ic_action_foot_light)
|
.iconColor(R.drawable.ic_action_polygom_dark)
|
||||||
.icons(R.drawable.ic_action_polygom_dark, R.drawable.ic_action_polygom_light)
|
|
||||||
.listen(l).reg();
|
.listen(l).reg();
|
||||||
if(TransportRouteHelper.getInstance().routeIsCalculated()){
|
if(TransportRouteHelper.getInstance().routeIsCalculated()){
|
||||||
adapter.item(R.string.layer_transport_route).selected(1)
|
adapter.item(R.string.layer_transport_route).selected(1)
|
||||||
.icons(R.drawable.ic_action_bus_dark, R.drawable.ic_action_bus_light).listen(l).reg();
|
.iconColor(R.drawable.ic_action_bus_dark).listen(l).reg();
|
||||||
}
|
}
|
||||||
|
|
||||||
OsmandPlugin.registerLayerContextMenu(activity.getMapView(), adapter, activity);
|
OsmandPlugin.registerLayerContextMenu(activity.getMapView(), adapter, activity);
|
||||||
|
|
|
@ -118,7 +118,7 @@ public class DistanceCalculatorPlugin extends OsmandPlugin {
|
||||||
if (mapInfoLayer != null ) {
|
if (mapInfoLayer != null ) {
|
||||||
distanceControl = createDistanceControl(activity);
|
distanceControl = createDistanceControl(activity);
|
||||||
mapInfoLayer.registerSideWidget(distanceControl,
|
mapInfoLayer.registerSideWidget(distanceControl,
|
||||||
R.drawable.widget_distance, R.drawable.widget_distance, R.string.map_widget_distancemeasurement, "distance.measurement", false, 21);
|
R.drawable.ic_action_ruler_dark, R.drawable.widget_distance, R.string.map_widget_distancemeasurement, "distance.measurement", false, 21);
|
||||||
mapInfoLayer.recreateControls();
|
mapInfoLayer.recreateControls();
|
||||||
updateText();
|
updateText();
|
||||||
}
|
}
|
||||||
|
@ -602,8 +602,7 @@ public class DistanceCalculatorPlugin extends OsmandPlugin {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
adapter.item(R.string.delete_point).icons(R.drawable.ic_action_delete_dark,
|
adapter.item(R.string.delete_point).iconColor(R.drawable.ic_action_delete_dark).listen(listener).reg();
|
||||||
R.drawable.ic_action_delete_light).listen(listener).reg();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -185,7 +185,7 @@ public class GpxUiHelper {
|
||||||
s = s.replace('_', ' ');
|
s = s.replace('_', ' ');
|
||||||
|
|
||||||
adapter.item(s).selected(multipleChoice ? 0 : -1)
|
adapter.item(s).selected(multipleChoice ? 0 : -1)
|
||||||
.icons(R.drawable.ic_action_info_dark, R.drawable.ic_action_info_light).reg();
|
.iconColor(R.drawable.ic_action_info_dark).reg();
|
||||||
|
|
||||||
//if there's some selected files - need to mark them as selected
|
//if there's some selected files - need to mark them as selected
|
||||||
if (selectedGpxList != null) {
|
if (selectedGpxList != null) {
|
||||||
|
@ -249,7 +249,7 @@ public class GpxUiHelper {
|
||||||
// User super class to create the View
|
// User super class to create the View
|
||||||
View v = activity.getLayoutInflater().inflate(layout, null);
|
View v = activity.getLayoutInflater().inflate(layout, null);
|
||||||
ImageView icon = (ImageView) v.findViewById(R.id.icon);
|
ImageView icon = (ImageView) v.findViewById(R.id.icon);
|
||||||
icon.setImageResource(adapter.getImageId(position, light));
|
icon.setImageDrawable(adapter.getImage(app, position, light));
|
||||||
final ArrayAdapter<String> arrayAdapter = this;
|
final ArrayAdapter<String> arrayAdapter = this;
|
||||||
icon.setOnClickListener(new View.OnClickListener() {
|
icon.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -47,7 +47,6 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
|
||||||
private OsmandApplication app;
|
private OsmandApplication app;
|
||||||
private TextInfoWidget monitoringControl;
|
private TextInfoWidget monitoringControl;
|
||||||
private LiveMonitoringHelper liveMonitoringHelper;
|
private LiveMonitoringHelper liveMonitoringHelper;
|
||||||
private boolean ADD_BG_TO_ACTION = true;
|
|
||||||
private boolean isSaving;
|
private boolean isSaving;
|
||||||
|
|
||||||
public OsmandMonitoringPlugin(OsmandApplication app) {
|
public OsmandMonitoringPlugin(OsmandApplication app) {
|
||||||
|
@ -100,7 +99,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
|
||||||
monitoringControl = createMonitoringControl(activity);
|
monitoringControl = createMonitoringControl(activity);
|
||||||
|
|
||||||
layer.registerSideWidget(monitoringControl,
|
layer.registerSideWidget(monitoringControl,
|
||||||
R.drawable.monitoring_rec_big, R.drawable.monitoring_rec_big, R.string.map_widget_monitoring, "monitoring", false, 18);
|
R.drawable.ic_action_play_dark, R.drawable.monitoring_rec_big, R.string.map_widget_monitoring, "monitoring", false, 18);
|
||||||
layer.recreateControls();
|
layer.recreateControls();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,7 +122,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
adapter.item(R.string.context_menu_item_add_waypoint).icons(R.drawable.ic_action_gnew_label_dark, R.drawable.ic_action_gnew_label_light)
|
adapter.item(R.string.context_menu_item_add_waypoint).iconColor(R.drawable.ic_action_gnew_label_dark)
|
||||||
.listen(listener).reg();
|
.listen(listener).reg();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -505,11 +505,11 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
adapter.item(R.string.osb_comment_menu_item).icons(
|
adapter.item(R.string.osb_comment_menu_item).iconColor(
|
||||||
R.drawable.ic_action_note_dark, R.drawable.ic_action_note_light
|
R.drawable.ic_action_note_dark
|
||||||
).listen(listener).reg();
|
).listen(listener).reg();
|
||||||
adapter.item(R.string.osb_close_menu_item).icons(
|
adapter.item(R.string.osb_close_menu_item).iconColor(
|
||||||
R.drawable.ic_action_remove_dark,R.drawable.ic_action_remove_light
|
R.drawable.ic_action_remove_dark
|
||||||
).listen(listener).reg();
|
).listen(listener).reg();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,8 +125,7 @@ public class OsMoPlugin extends OsmandPlugin implements OsMoReactor {
|
||||||
public void registerMapContextMenuActions(final MapActivity mapActivity, final double latitude, final double longitude,
|
public void registerMapContextMenuActions(final MapActivity mapActivity, final double latitude, final double longitude,
|
||||||
ContextMenuAdapter adapter, final Object selectedObj) {
|
ContextMenuAdapter adapter, final Object selectedObj) {
|
||||||
if(selectedObj instanceof OsMoDevice) {
|
if(selectedObj instanceof OsMoDevice) {
|
||||||
adapter.item(R.string.osmo_center_location).icons(R.drawable.ic_action_gloc_dark,
|
adapter.item(R.string.osmo_center_location).iconColor(R.drawable.ic_action_gloc_dark).listen(new OnContextMenuClick() {
|
||||||
R.drawable.ic_action_gloc_light).listen(new OnContextMenuClick() {
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
|
@ -140,8 +139,7 @@ public class OsMoPlugin extends OsmandPlugin implements OsMoReactor {
|
||||||
}
|
}
|
||||||
}).position(0).reg();
|
}).position(0).reg();
|
||||||
if(OsMoPositionLayer.getFollowDestinationId() != null) {
|
if(OsMoPositionLayer.getFollowDestinationId() != null) {
|
||||||
adapter.item(R.string.osmo_cancel_moving_target).icons(R.drawable.ic_action_close_dark,
|
adapter.item(R.string.osmo_cancel_moving_target).iconColor(R.drawable.ic_action_close_dark).listen(new OnContextMenuClick() {
|
||||||
R.drawable.ic_action_close_light).listen(new OnContextMenuClick() {
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
|
@ -151,8 +149,7 @@ public class OsMoPlugin extends OsmandPlugin implements OsMoReactor {
|
||||||
|
|
||||||
}).position(0).reg();
|
}).position(0).reg();
|
||||||
}
|
}
|
||||||
adapter.item(R.string.osmo_set_moving_target).icons(R.drawable.ic_action_flag_dark,
|
adapter.item(R.string.osmo_set_moving_target).iconColor(R.drawable.ic_action_flag_dark).listen(new OnContextMenuClick() {
|
||||||
R.drawable.ic_action_flag_light).listen(new OnContextMenuClick() {
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
|
@ -175,7 +172,7 @@ public class OsMoPlugin extends OsmandPlugin implements OsMoReactor {
|
||||||
MapInfoLayer layer = activity.getMapLayers().getMapInfoLayer();
|
MapInfoLayer layer = activity.getMapLayers().getMapInfoLayer();
|
||||||
osmoControl = createOsMoControl(activity);
|
osmoControl = createOsMoControl(activity);
|
||||||
layer.registerSideWidget(osmoControl,
|
layer.registerSideWidget(osmoControl,
|
||||||
R.drawable.mon_osmo_signal_inactive, R.drawable.mon_osmo_signal_inactive, R.string.osmo_control, "osmo_control", false, 18);
|
R.drawable.ic_action_osmo, R.drawable.mon_osmo_signal_inactive, R.string.osmo_control, "osmo_control", false, 18);
|
||||||
layer.recreateControls();
|
layer.recreateControls();
|
||||||
|
|
||||||
if(olayer != null) {
|
if(olayer != null) {
|
||||||
|
@ -291,7 +288,7 @@ public class OsMoPlugin extends OsmandPlugin implements OsMoReactor {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerOptionsMenuItems(final MapActivity mapActivity, ContextMenuAdapter helper) {
|
public void registerOptionsMenuItems(final MapActivity mapActivity, ContextMenuAdapter helper) {
|
||||||
helper.item(R.string.osmo_groups).icons(R.drawable.ic_osmo_dark, R.drawable.ic_osmo_light).position(6)
|
helper.item(R.string.osmo_groups).iconColor(R.drawable.ic_osmo_dark).position(6)
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
|
|
|
@ -191,7 +191,7 @@ public class ParkingPositionPlugin extends OsmandPlugin {
|
||||||
if (mapInfoLayer != null) {
|
if (mapInfoLayer != null) {
|
||||||
parkingPlaceControl = createParkingPlaceInfoControl(activity);
|
parkingPlaceControl = createParkingPlaceInfoControl(activity);
|
||||||
mapInfoLayer.registerSideWidget(parkingPlaceControl,
|
mapInfoLayer.registerSideWidget(parkingPlaceControl,
|
||||||
R.drawable.widget_parking, R.drawable.widget_parking, R.string.map_widget_parking, "parking", false, 8);
|
R.drawable.ic_action_parking_dark, R.drawable.widget_parking, R.string.map_widget_parking, "parking", false, 8);
|
||||||
mapInfoLayer.recreateControls();
|
mapInfoLayer.recreateControls();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -212,7 +212,7 @@ public class ParkingPositionPlugin extends OsmandPlugin {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
adapter.item(R.string.context_menu_item_delete_parking_point)
|
adapter.item(R.string.context_menu_item_delete_parking_point)
|
||||||
.icons( R.drawable.ic_action_remove_dark, R.drawable.ic_action_remove_light).listen(removeListener).position(0).reg();
|
.iconColor( R.drawable.ic_action_remove_dark).listen(removeListener).position(0).reg();
|
||||||
}
|
}
|
||||||
|
|
||||||
OnContextMenuClick addListener = new OnContextMenuClick() {
|
OnContextMenuClick addListener = new OnContextMenuClick() {
|
||||||
|
@ -226,7 +226,7 @@ public class ParkingPositionPlugin extends OsmandPlugin {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
adapter.item(R.string.context_menu_item_add_parking_point)
|
adapter.item(R.string.context_menu_item_add_parking_point)
|
||||||
.icons( R.drawable.ic_action_parking_dark, R.drawable.ic_action_parking_light).listen(addListener).reg();
|
.iconColor( R.drawable.ic_action_parking_dark).listen(addListener).reg();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -214,12 +214,12 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
adapter.item(R.string.layer_map).icons(R.drawable.ic_action_globus_dark, R.drawable.ic_action_globus_light)
|
adapter.item(R.string.layer_map).iconColor(R.drawable.ic_action_globus_dark)
|
||||||
.listen(listener).position(3).reg();
|
.listen(listener).position(3).reg();
|
||||||
adapter.item(R.string.layer_overlay).selected(overlayLayer.getMap() != null ? 1 : 0).
|
adapter.item(R.string.layer_overlay).selected(overlayLayer.getMap() != null ? 1 : 0).
|
||||||
icons(R.drawable.ic_layer_top_dark, R.drawable.ic_layer_top_light).listen(listener).position(14).reg();
|
iconColor(R.drawable.ic_layer_top_dark).listen(listener).position(14).reg();
|
||||||
adapter.item(R.string.layer_underlay).selected(underlayLayer.getMap() != null ? 1 : 0)
|
adapter.item(R.string.layer_underlay).selected(underlayLayer.getMap() != null ? 1 : 0)
|
||||||
.icons(R.drawable.ic_layer_bottom_dark, R.drawable.ic_layer_bottom_light).listen(listener).position(15).reg();
|
.iconColor(R.drawable.ic_layer_bottom_dark).listen(listener).position(15).reg();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -240,9 +240,9 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
adapter.item(R.string.context_menu_item_update_map).icons(R.drawable.ic_action_refresh_dark, R.drawable.ic_action_refresh_light)
|
adapter.item(R.string.context_menu_item_update_map).iconColor(R.drawable.ic_action_refresh_dark)
|
||||||
.listen(listener).reg();
|
.listen(listener).reg();
|
||||||
adapter.item(R.string.context_menu_item_download_map).icons(R.drawable.ic_action_gdown_dark, R.drawable.ic_action_gdown_light)
|
adapter.item(R.string.context_menu_item_download_map).iconColor(R.drawable.ic_action_gdown_dark)
|
||||||
.listen(listener).reg();
|
.listen(listener).reg();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,22 +97,22 @@ public class RoutePointsLayer extends OsmandMapLayer implements ContextMenuLaye
|
||||||
};
|
};
|
||||||
|
|
||||||
if (plugin.getCurrentRoute().getPointStatus(point)){
|
if (plugin.getCurrentRoute().getPointStatus(point)){
|
||||||
adapter.item(R.string.mark_as_not_visited).icons(
|
adapter.item(R.string.mark_as_not_visited).iconColor(
|
||||||
R.drawable.ic_action_gremove_dark, R.drawable.ic_action_gremove_light).listen(listener).reg();
|
R.drawable.ic_action_gremove_dark).listen(listener).reg();
|
||||||
} else {
|
} else {
|
||||||
adapter.item(R.string.mark_as_visited).icons(
|
adapter.item(R.string.mark_as_visited).iconColor(
|
||||||
R.drawable.ic_action_ok_dark, R.drawable.ic_action_ok_light).listen(listener).reg();
|
R.drawable.ic_action_ok_dark).listen(listener).reg();
|
||||||
}
|
}
|
||||||
|
|
||||||
RoutePointsPlugin.RoutePoint routePoint = plugin.getCurrentRoute().getRoutePointFromWpt(point);
|
RoutePointsPlugin.RoutePoint routePoint = plugin.getCurrentRoute().getRoutePointFromWpt(point);
|
||||||
if (routePoint != null) {
|
if (routePoint != null) {
|
||||||
if (routePoint.isNextNavigate) {
|
if (routePoint.isNextNavigate) {
|
||||||
adapter.item(R.string.navigate_to_next)
|
adapter.item(R.string.navigate_to_next)
|
||||||
.icons(R.drawable.ic_action_gnext_dark, R.drawable.ic_action_gnext_light).listen(listener)
|
.iconColor(R.drawable.ic_action_gnext_dark).listen(listener)
|
||||||
.reg();
|
.reg();
|
||||||
} else {
|
} else {
|
||||||
adapter.item(R.string.mark_as_current)
|
adapter.item(R.string.mark_as_current)
|
||||||
.icons(R.drawable.ic_action_signpost_dark, R.drawable.ic_action_signpost_light)
|
.iconColor(R.drawable.ic_action_signpost_dark)
|
||||||
.listen(listener).reg();
|
.listen(listener).reg();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -201,7 +201,7 @@ public class RoutePointsPlugin extends OsmandPlugin {
|
||||||
if (mapInfoLayer != null) {
|
if (mapInfoLayer != null) {
|
||||||
routeStepsControl = createRouteStepsInfoControl(activity);
|
routeStepsControl = createRouteStepsInfoControl(activity);
|
||||||
mapInfoLayer.registerSideWidget(routeStepsControl,
|
mapInfoLayer.registerSideWidget(routeStepsControl,
|
||||||
R.drawable.widget_signpost, R.drawable.widget_signpost, R.string.map_widget_route_points, "route_steps", false, 8);
|
R.drawable.ic_action_signpost_dark, R.drawable.widget_signpost, R.string.map_widget_route_points, "route_steps", false, 8);
|
||||||
mapInfoLayer.recreateControls();
|
mapInfoLayer.recreateControls();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -487,7 +487,7 @@ public class SherpafyCustomization extends OsmAndAppCustomization {
|
||||||
if(layers.getContextMenuLayer().getFirstSelectedObject() instanceof StageFavorite) {
|
if(layers.getContextMenuLayer().getFirstSelectedObject() instanceof StageFavorite) {
|
||||||
final StageFavorite sf = ((StageFavorite)layers.getContextMenuLayer().getFirstSelectedObject());
|
final StageFavorite sf = ((StageFavorite)layers.getContextMenuLayer().getFirstSelectedObject());
|
||||||
if(selectedStage != null) {
|
if(selectedStage != null) {
|
||||||
adapter.item(R.string.show_waypoint_information).icons(R.drawable.ic_action_info_dark, R.drawable.ic_action_info_light ).position(0)
|
adapter.item(R.string.show_waypoint_information).iconColor(R.drawable.ic_action_info_dark).position(0)
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
|
@ -538,8 +538,8 @@ public class SherpafyCustomization extends OsmAndAppCustomization {
|
||||||
R.string.where_am_i, R.string.context_menu_item_share_location);
|
R.string.where_am_i, R.string.context_menu_item_share_location);
|
||||||
//poi
|
//poi
|
||||||
if (osmandSettings.SHOW_POI_OVER_MAP.get()) {
|
if (osmandSettings.SHOW_POI_OVER_MAP.get()) {
|
||||||
adapter.item(R.string.sherpafy_disable_poi).icons(
|
adapter.item(R.string.sherpafy_disable_poi).iconColor(
|
||||||
R.drawable.ic_action_gremove_dark, R.drawable.ic_action_gremove_light)
|
R.drawable.ic_action_gremove_dark)
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
|
@ -549,7 +549,7 @@ public class SherpafyCustomization extends OsmAndAppCustomization {
|
||||||
}
|
}
|
||||||
}).reg();
|
}).reg();
|
||||||
} else {
|
} else {
|
||||||
adapter.item(R.string.poi).icons(R.drawable.ic_action_layers_dark, R.drawable.ic_action_layers_light)
|
adapter.item(R.string.poi).iconColor(R.drawable.ic_action_layers_dark)
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
|
@ -561,7 +561,7 @@ public class SherpafyCustomization extends OsmAndAppCustomization {
|
||||||
}).reg();
|
}).reg();
|
||||||
}
|
}
|
||||||
//important info
|
//important info
|
||||||
adapter.item(R.string.sherpafy_tour_info_txt).icons(R.drawable.ic_action_info_dark, R.drawable.ic_action_info_light)
|
adapter.item(R.string.sherpafy_tour_info_txt).iconColor(R.drawable.ic_action_info_dark)
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
|
@ -575,7 +575,7 @@ public class SherpafyCustomization extends OsmAndAppCustomization {
|
||||||
final StageInformation stage = getSelectedStage();
|
final StageInformation stage = getSelectedStage();
|
||||||
if (stage != null && !isStageVisited(stage.order)) {
|
if (stage != null && !isStageVisited(stage.order)) {
|
||||||
adapter.item(R.string.complete_stage)
|
adapter.item(R.string.complete_stage)
|
||||||
.icons(R.drawable.ic_action_finish_flag_dark, R.drawable.ic_action_finish_flag_light)
|
.iconColor(R.drawable.ic_action_finish_flag_dark)
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
|
@ -586,8 +586,8 @@ public class SherpafyCustomization extends OsmAndAppCustomization {
|
||||||
}).reg();
|
}).reg();
|
||||||
}
|
}
|
||||||
//share my location
|
//share my location
|
||||||
adapter.item(R.string.context_menu_item_share_location).icons(
|
adapter.item(R.string.context_menu_item_share_location).iconColor(
|
||||||
R.drawable.ic_action_gshare_dark, R.drawable.ic_action_gshare_light).listen(new OnContextMenuClick() {
|
R.drawable.ic_action_gshare_dark).listen(new OnContextMenuClick() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
if (app.getLocationProvider().getLastKnownLocation() != null) {
|
if (app.getLocationProvider().getLastKnownLocation() != null) {
|
||||||
|
|
|
@ -111,7 +111,7 @@ public class SRTMPlugin extends OsmandPlugin {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
adapter.item(R.string.layer_hillshade).selected(HILLSHADE.get()? 1 : 0)
|
adapter.item(R.string.layer_hillshade).selected(HILLSHADE.get()? 1 : 0)
|
||||||
.icons( R.drawable.ic_action_hillshade_dark, R.drawable.ic_action_hillshade_light).listen(listener).position(13).layout(R.layout.drawer_list_item).reg();
|
.iconColor( R.drawable.ic_action_hillshade_dark).listen(listener).position(13).layout(R.layout.drawer_list_item).reg();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -222,7 +222,7 @@ public class FavoritesLayer extends OsmandMapLayer implements ContextMenuLayer.
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
adapter.item(R.string.favourites_context_menu_delete)
|
adapter.item(R.string.favourites_context_menu_delete)
|
||||||
.icons(R.drawable.ic_action_delete_dark, R.drawable.ic_action_delete_light).listen(listener)
|
.iconColor(R.drawable.ic_action_delete_dark).listen(listener)
|
||||||
.reg();
|
.reg();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,9 +82,9 @@ public class MapInfoLayer extends OsmandMapLayer {
|
||||||
recreateControls();
|
recreateControls();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void registerSideWidget(TextInfoWidget widget, int drawableDark,int drawableLight,
|
public void registerSideWidget(TextInfoWidget widget, int drawableMenu, int drawableMap,
|
||||||
int messageId, String key, boolean left, int priorityOrder) {
|
int messageId, String key, boolean left, int priorityOrder) {
|
||||||
MapWidgetRegInfo reg = mapInfoControls.registerSideWidgetInternal(widget, drawableDark, drawableLight, messageId, key, left, priorityOrder);
|
MapWidgetRegInfo reg = mapInfoControls.registerSideWidgetInternal(widget, drawableMenu, drawableMap, messageId, key, left, priorityOrder);
|
||||||
updateReg(calculateTextState(), reg);
|
updateReg(calculateTextState(), reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,29 +105,29 @@ public class MapInfoLayer extends OsmandMapLayer {
|
||||||
|
|
||||||
// register left stack
|
// register left stack
|
||||||
NextTurnInfoWidget bigInfoControl = ric.createNextInfoControl(map, app, false);
|
NextTurnInfoWidget bigInfoControl = ric.createNextInfoControl(map, app, false);
|
||||||
registerSideWidget(bigInfoControl, R.drawable.widget_next_turn, R.drawable.widget_next_turn, R.string.map_widget_next_turn,"next_turn", true, 5);
|
registerSideWidget(bigInfoControl, R.drawable.ic_action_next_turn, R.drawable.widget_next_turn, R.string.map_widget_next_turn,"next_turn", true, 5);
|
||||||
NextTurnInfoWidget smallInfoControl = ric.createNextInfoControl(map, app, true);
|
NextTurnInfoWidget smallInfoControl = ric.createNextInfoControl(map, app, true);
|
||||||
registerSideWidget(smallInfoControl, R.drawable.widget_next_turn, R.drawable.widget_next_turn, R.string.map_widget_next_turn_small, "next_turn_small", true,
|
registerSideWidget(smallInfoControl, R.drawable.ic_action_next_turn, R.drawable.widget_next_turn, R.string.map_widget_next_turn_small, "next_turn_small", true,
|
||||||
10);
|
10);
|
||||||
NextTurnInfoWidget nextNextInfoControl = ric.createNextNextInfoControl(map, app, true);
|
NextTurnInfoWidget nextNextInfoControl = ric.createNextNextInfoControl(map, app, true);
|
||||||
registerSideWidget(nextNextInfoControl, R.drawable.widget_next_turn, R.drawable.widget_next_turn, R.string.map_widget_next_next_turn, "next_next_turn",true, 15);
|
registerSideWidget(nextNextInfoControl, R.drawable.ic_action_next_turn, R.drawable.widget_next_turn, R.string.map_widget_next_next_turn, "next_next_turn",true, 15);
|
||||||
// right stack
|
// right stack
|
||||||
TextInfoWidget intermediateDist = ric.createIntermediateDistanceControl(map);
|
TextInfoWidget intermediateDist = ric.createIntermediateDistanceControl(map);
|
||||||
registerSideWidget(intermediateDist, R.drawable.widget_intermediate, R.drawable.widget_intermediate, R.string.map_widget_intermediate_distance, "intermediate_distance", false, 3);
|
registerSideWidget(intermediateDist, R.drawable.ic_action_intermediate, R.drawable.widget_intermediate, R.string.map_widget_intermediate_distance, "intermediate_distance", false, 3);
|
||||||
TextInfoWidget dist = ric.createDistanceControl(map);
|
TextInfoWidget dist = ric.createDistanceControl(map);
|
||||||
registerSideWidget(dist, R.drawable.widget_target, R.drawable.widget_target, R.string.map_widget_distance, "distance", false, 5);
|
registerSideWidget(dist, R.drawable.ic_action_target, R.drawable.widget_target, R.string.map_widget_distance, "distance", false, 5);
|
||||||
TextInfoWidget time = ric.createTimeControl(map);
|
TextInfoWidget time = ric.createTimeControl(map);
|
||||||
registerSideWidget(time, R.drawable.widget_time, R.drawable.widget_time, R.string.map_widget_time, "time", false, 10);
|
registerSideWidget(time, R.drawable.ic_action_time, R.drawable.widget_time, R.string.map_widget_time, "time", false, 10);
|
||||||
TextInfoWidget speed = ric.createSpeedControl(map);
|
TextInfoWidget speed = ric.createSpeedControl(map);
|
||||||
registerSideWidget(speed, R.drawable.widget_speed, R.drawable.widget_speed, R.string.map_widget_speed, "speed", false, 15);
|
registerSideWidget(speed, R.drawable.ic_action_speed, R.drawable.widget_speed, R.string.map_widget_speed, "speed", false, 15);
|
||||||
TextInfoWidget gpsInfo = mic.createGPSInfoControl(map);
|
TextInfoWidget gpsInfo = mic.createGPSInfoControl(map);
|
||||||
registerSideWidget(gpsInfo, R.drawable.widget_gps_info, R.drawable.widget_gps_info, R.string.map_widget_gps_info, "gps_info", false, 17);
|
registerSideWidget(gpsInfo, R.drawable.ic_action_gps_info, R.drawable.widget_gps_info, R.string.map_widget_gps_info, "gps_info", false, 17);
|
||||||
TextInfoWidget maxspeed = ric.createMaxSpeedControl(map);
|
TextInfoWidget maxspeed = ric.createMaxSpeedControl(map);
|
||||||
registerSideWidget(maxspeed, R.drawable.widget_max_speed, R.drawable.widget_max_speed, R.string.map_widget_max_speed, "max_speed", false, 18);
|
registerSideWidget(maxspeed, R.drawable.ic_action_max_speed, R.drawable.widget_max_speed, R.string.map_widget_max_speed, "max_speed", false, 18);
|
||||||
TextInfoWidget alt = mic.createAltitudeControl(map);
|
TextInfoWidget alt = mic.createAltitudeControl(map);
|
||||||
registerSideWidget(alt, R.drawable.widget_altitude, R.drawable.widget_altitude, R.string.map_widget_altitude, "altitude", false, 20);
|
registerSideWidget(alt, R.drawable.ic_action_altitude, R.drawable.widget_altitude, R.string.map_widget_altitude, "altitude", false, 20);
|
||||||
TextInfoWidget plainTime = ric.createPlainTimeControl(map);
|
TextInfoWidget plainTime = ric.createPlainTimeControl(map);
|
||||||
registerSideWidget(plainTime, R.drawable.widget_time_to_distance, R.drawable.widget_time_to_distance, R.string.map_widget_plain_time, "plain_time", false, 25);
|
registerSideWidget(plainTime, R.drawable.ic_action_time_to_distance, R.drawable.widget_time_to_distance, R.string.map_widget_plain_time, "plain_time", false, 25);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -306,7 +306,7 @@ public class MapInfoLayer extends OsmandMapLayer {
|
||||||
public ContextMenuAdapter getViewConfigureMenuAdapter() {
|
public ContextMenuAdapter getViewConfigureMenuAdapter() {
|
||||||
ContextMenuAdapter cm = new ContextMenuAdapter(view.getContext());
|
ContextMenuAdapter cm = new ContextMenuAdapter(view.getContext());
|
||||||
cm.setDefaultLayoutId(R.layout.drawer_list_item);
|
cm.setDefaultLayoutId(R.layout.drawer_list_item);
|
||||||
cm.item(R.string.layer_map_appearance).icons(R.drawable.ic_back_drawer_dark, R.drawable.ic_back_drawer_white)
|
cm.item(R.string.layer_map_appearance).iconColor(R.drawable.ic_back_drawer_dark)
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -324,7 +324,7 @@ public class MapInfoLayer extends OsmandMapLayer {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
cm.item(R.string.map_widget_reset)
|
cm.item(R.string.map_widget_reset)
|
||||||
.icons(R.drawable.widget_reset_to_default_dark, R.drawable.widget_reset_to_default_light).listen(new OnContextMenuClick() {
|
.iconColor(R.drawable.widget_reset_to_default_dark).listen(new OnContextMenuClick() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||||
|
|
|
@ -286,15 +286,15 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
|
||||||
};
|
};
|
||||||
if (OsmAndFormatter.getAmenityDescriptionContent(view.getApplication(), a, false).length() > 0) {
|
if (OsmAndFormatter.getAmenityDescriptionContent(view.getApplication(), a, false).length() > 0) {
|
||||||
adapter.item(R.string.poi_context_menu_showdescription)
|
adapter.item(R.string.poi_context_menu_showdescription)
|
||||||
.icons(R.drawable.ic_action_note_dark, R.drawable.ic_action_note_light).listen(listener).reg();
|
.iconColor(R.drawable.ic_action_note_dark).listen(listener).reg();
|
||||||
}
|
}
|
||||||
if (a.getPhone() != null) {
|
if (a.getPhone() != null) {
|
||||||
adapter.item(R.string.poi_context_menu_call)
|
adapter.item(R.string.poi_context_menu_call)
|
||||||
.icons(R.drawable.ic_action_call_dark, R.drawable.ic_action_call_light).listen(listener).reg();
|
.iconColor(R.drawable.ic_action_call_dark).listen(listener).reg();
|
||||||
}
|
}
|
||||||
if (a.getSite() != null) {
|
if (a.getSite() != null) {
|
||||||
adapter.item(R.string.poi_context_menu_website)
|
adapter.item(R.string.poi_context_menu_website)
|
||||||
.icons(R.drawable.ic_action_globus_dark, R.drawable.ic_action_globus_light).listen(listener)
|
.iconColor(R.drawable.ic_action_globus_dark).listen(listener)
|
||||||
.reg();
|
.reg();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -238,7 +238,7 @@ public class PointNavigationLayer extends OsmandMapLayer implements IContextMenu
|
||||||
|
|
||||||
|
|
||||||
adapter.item(R.string.delete_target_point)
|
adapter.item(R.string.delete_target_point)
|
||||||
.icons( R.drawable.ic_action_remove_dark, R.drawable.ic_action_remove_light).listen(listener).reg();
|
.iconColor( R.drawable.ic_action_remove_dark).listen(listener).reg();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -224,7 +224,7 @@ public class TransportStopsLayer extends OsmandMapLayer implements ContextMenuLa
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
adapter.item(R.string.poi_context_menu_showdescription)
|
adapter.item(R.string.poi_context_menu_showdescription)
|
||||||
.icons( R.drawable.ic_action_note_dark, R.drawable.ic_action_note_light).listen(listener).reg();
|
.iconColor( R.drawable.ic_action_note_dark).listen(listener).reg();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -89,9 +89,9 @@ public class MapWidgetRegistry {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public MapWidgetRegInfo registerSideWidgetInternal(TextInfoWidget widget, int drawableDark,int drawableLight,
|
public MapWidgetRegInfo registerSideWidgetInternal(TextInfoWidget widget, int drawableMenu, int drawableMap,
|
||||||
int messageId, String key, boolean left, int priorityOrder) {
|
int messageId, String key, boolean left, int priorityOrder) {
|
||||||
MapWidgetRegInfo ii = new MapWidgetRegInfo(key, widget, drawableDark, drawableLight,
|
MapWidgetRegInfo ii = new MapWidgetRegInfo(key, widget, drawableMenu, drawableMap,
|
||||||
messageId, priorityOrder, left);
|
messageId, priorityOrder, left);
|
||||||
for (ApplicationMode ms : ApplicationMode.values(settings)) {
|
for (ApplicationMode ms : ApplicationMode.values(settings)) {
|
||||||
boolean collapse = ms.isWidgetCollapsible(key);
|
boolean collapse = ms.isWidgetCollapsible(key);
|
||||||
|
@ -281,7 +281,7 @@ public class MapWidgetRegistry {
|
||||||
private void addControls(final MapInfoLayer mil, final ContextMenuAdapter adapter, Set<MapWidgetRegInfo> top, final ApplicationMode mode) {
|
private void addControls(final MapInfoLayer mil, final ContextMenuAdapter adapter, Set<MapWidgetRegInfo> top, final ApplicationMode mode) {
|
||||||
for(final MapWidgetRegInfo r : top){
|
for(final MapWidgetRegInfo r : top){
|
||||||
adapter.item(r.messageId).selected(r.visibleCollapsed(mode) || r.visible(mode) ? 1 : 0)
|
adapter.item(r.messageId).selected(r.visibleCollapsed(mode) || r.visible(mode) ? 1 : 0)
|
||||||
.icons(r.drawableDark, r.drawableLight).listen(new OnContextMenuClick() {
|
.iconColor(r.drawableMenu).listen(new OnContextMenuClick() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextMenuClick(ArrayAdapter<?> a, int itemId, int pos, boolean isChecked) {
|
public boolean onContextMenuClick(ArrayAdapter<?> a, int itemId, int pos, boolean isChecked) {
|
||||||
|
@ -303,8 +303,8 @@ public class MapWidgetRegistry {
|
||||||
|
|
||||||
public static class MapWidgetRegInfo implements Comparable<MapWidgetRegInfo> {
|
public static class MapWidgetRegInfo implements Comparable<MapWidgetRegInfo> {
|
||||||
public final TextInfoWidget widget;
|
public final TextInfoWidget widget;
|
||||||
public final int drawableDark;
|
public final int drawableMenu;
|
||||||
public final int drawableLight;
|
public final int drawableMap;
|
||||||
public final int messageId;
|
public final int messageId;
|
||||||
public final String key;
|
public final String key;
|
||||||
public final boolean left;
|
public final boolean left;
|
||||||
|
@ -313,12 +313,13 @@ public class MapWidgetRegistry {
|
||||||
private final Set<ApplicationMode> visibleModes = new LinkedHashSet<ApplicationMode>();
|
private final Set<ApplicationMode> visibleModes = new LinkedHashSet<ApplicationMode>();
|
||||||
private Runnable stateChangeListener = null;
|
private Runnable stateChangeListener = null;
|
||||||
|
|
||||||
public MapWidgetRegInfo(String key, TextInfoWidget widget, int drawableDark, int drawableLight, int messageId, int priorityOrder,
|
public MapWidgetRegInfo(String key, TextInfoWidget widget, int drawableMenu,
|
||||||
|
int drawableMap, int messageId, int priorityOrder,
|
||||||
boolean left) {
|
boolean left) {
|
||||||
this.key = key;
|
this.key = key;
|
||||||
this.widget = widget;
|
this.widget = widget;
|
||||||
this.drawableDark = drawableDark;
|
this.drawableMenu = drawableMenu;
|
||||||
this.drawableLight = drawableLight;
|
this.drawableMap = drawableMap;
|
||||||
this.messageId = messageId;
|
this.messageId = messageId;
|
||||||
this.priorityOrder = priorityOrder;
|
this.priorityOrder = priorityOrder;
|
||||||
this.left = left;
|
this.left = left;
|
||||||
|
|