diff --git a/OsmAnd/src/net/osmand/plus/dialogs/SelectMapViewQuickActionsBottomSheet.java b/OsmAnd/src/net/osmand/plus/dialogs/SelectMapViewQuickActionsBottomSheet.java index 945bc2e0f8..59207bb935 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/SelectMapViewQuickActionsBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/SelectMapViewQuickActionsBottomSheet.java @@ -162,7 +162,7 @@ public class SelectMapViewQuickActionsBottomSheet extends MenuBottomSheetDialogF List stylesList = mapStyleAction.getFilteredStyles(); for (String entry : stylesList) { boolean selected = entry.equals(selectedItem); - createItemRow(selected, counter, null, + createItemRow(selected, counter, getContentIcon(action.getIconRes()), mapStyleAction.getTranslatedItemName(context, entry), entry); counter++; } @@ -187,7 +187,7 @@ public class SelectMapViewQuickActionsBottomSheet extends MenuBottomSheetDialogF for (Pair entry : sources) { String tag = entry.first; boolean selected = tag.equals(selectedItem); - createItemRow(selected, counter, null, entry.second, tag); + createItemRow(selected, counter, getContentIcon(action.getIconRes()), entry.second, tag); counter++; } } @@ -205,9 +205,6 @@ public class SelectMapViewQuickActionsBottomSheet extends MenuBottomSheetDialogF RadioButton rb = (RadioButton) view.findViewById(R.id.compound_button); rb.setChecked(selected); CompoundButtonCompat.setButtonTintList(rb, rbColorList); - if (icon == null) { - icon = getContentIcon(action.getIconRes()); - } ImageView imageView = (ImageView) view.findViewById(R.id.icon); imageView.setImageDrawable(icon); } diff --git a/OsmAnd/src/net/osmand/plus/profiles/SelectMultipleProfileBottomSheet.java b/OsmAnd/src/net/osmand/plus/profiles/SelectMultipleProfilesBottomSheet.java similarity index 94% rename from OsmAnd/src/net/osmand/plus/profiles/SelectMultipleProfileBottomSheet.java rename to OsmAnd/src/net/osmand/plus/profiles/SelectMultipleProfilesBottomSheet.java index 01e80e6a47..3d0cfb873a 100644 --- a/OsmAnd/src/net/osmand/plus/profiles/SelectMultipleProfileBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/profiles/SelectMultipleProfilesBottomSheet.java @@ -24,9 +24,9 @@ import net.osmand.plus.settings.bottomsheets.BasePreferenceBottomSheet; import java.util.ArrayList; import java.util.List; -public class SelectMultipleProfileBottomSheet extends BasePreferenceBottomSheet { +public class SelectMultipleProfilesBottomSheet extends BasePreferenceBottomSheet { - public static final String TAG = SelectMultipleProfileBottomSheet.class.getSimpleName(); + public static final String TAG = SelectMultipleProfilesBottomSheet.class.getSimpleName(); public static final String SELECTED_KEYS = "selected_keys"; public static final String DISABLED_KEYS = "disabled_keys"; @@ -146,7 +146,7 @@ public class SelectMultipleProfileBottomSheet extends BasePreferenceBottomSheet @Nullable List disabledProfiles, boolean usedOnMap, CallbackWithObject> callback) { - SelectMultipleProfileBottomSheet fragment = new SelectMultipleProfileBottomSheet(); + SelectMultipleProfilesBottomSheet fragment = new SelectMultipleProfilesBottomSheet(); Bundle args = new Bundle(); args.putStringArrayList(SELECTED_KEYS, selectedProfiles != null ? new ArrayList<>(selectedProfiles) : new ArrayList()); @@ -155,7 +155,7 @@ public class SelectMultipleProfileBottomSheet extends BasePreferenceBottomSheet fragment.setArguments(args); fragment.setUsedOnMap(usedOnMap); fragment.setCallback(callback); - fragment.show(mapActivity.getSupportFragmentManager(), SelectMultipleProfileBottomSheet.TAG); + fragment.show(mapActivity.getSupportFragmentManager(), SelectMultipleProfilesBottomSheet.TAG); } } diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/SwitchProfileAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/SwitchProfileAction.java index 42002cb730..ab6b60eaca 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/SwitchProfileAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/SwitchProfileAction.java @@ -16,7 +16,7 @@ import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; -import net.osmand.plus.profiles.SelectMultipleProfileBottomSheet; +import net.osmand.plus.profiles.SelectMultipleProfilesBottomSheet; import net.osmand.plus.quickaction.QuickAction; import net.osmand.plus.quickaction.QuickActionType; import net.osmand.plus.quickaction.SwitchableAction; @@ -208,7 +208,7 @@ public class SwitchProfileAction extends SwitchableAction { @Override public void onClick(View v) { List selectedProfilesKeys = new ArrayList<>(adapter.getItemsList()); - SelectMultipleProfileBottomSheet.showInstance(activity, selectedProfilesKeys, + SelectMultipleProfilesBottomSheet.showInstance(activity, selectedProfilesKeys, selectedProfilesKeys, false, new CallbackWithObject>() { @Override public boolean processResult(List result) {