Search in sources :

Example 1 with MapMarkersMode

use of net.osmand.plus.OsmandSettings.MapMarkersMode in project Osmand by osmandapp.

the class DirectionIndicationDialogFragment method updateSelection.

private void updateSelection(boolean notifyListener) {
    OsmandSettings settings = getSettings();
    MapMarkersMode mode = settings.MAP_MARKERS_MODE.get();
    boolean distIndEnabled = settings.MARKERS_DISTANCE_INDICATION_ENABLED.get();
    int count = settings.DISPLAYED_MARKERS_WIDGETS_COUNT.get();
    int topBarIconId = count == 1 ? R.drawable.ic_action_device_topbar : R.drawable.ic_action_device_topbar_two;
    int widgetIconId = count == 1 ? R.drawable.ic_action_device_widget : R.drawable.ic_action_device_widget_two;
    updateIcon(R.id.top_bar_icon, topBarIconId, mode.isToolbar() && distIndEnabled);
    updateIcon(R.id.widget_icon, widgetIconId, mode.isWidgets() && distIndEnabled);
    updateMarkerModeRow(R.id.top_bar_row, R.id.top_bar_radio_button, mode.isToolbar(), distIndEnabled);
    updateMarkerModeRow(R.id.widget_row, R.id.widget_radio_button, mode.isWidgets(), distIndEnabled);
    if (notifyListener) {
        notifyListener();
    }
    updateHelpImage();
}
Also used : OsmandSettings(net.osmand.plus.OsmandSettings) Paint(android.graphics.Paint) MapMarkersMode(net.osmand.plus.OsmandSettings.MapMarkersMode)

Aggregations

Paint (android.graphics.Paint)1 OsmandSettings (net.osmand.plus.OsmandSettings)1 MapMarkersMode (net.osmand.plus.OsmandSettings.MapMarkersMode)1