small fixes
This commit is contained in:
parent
5a5463d4a9
commit
f50d28b235
3 changed files with 8 additions and 11 deletions
|
@ -162,7 +162,7 @@ public class SelectMapViewQuickActionsBottomSheet extends MenuBottomSheetDialogF
|
|||
List<String> 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<String, String> 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);
|
||||
}
|
||||
|
|
|
@ -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<String> disabledProfiles,
|
||||
boolean usedOnMap,
|
||||
CallbackWithObject<List<String>> callback) {
|
||||
SelectMultipleProfileBottomSheet fragment = new SelectMultipleProfileBottomSheet();
|
||||
SelectMultipleProfilesBottomSheet fragment = new SelectMultipleProfilesBottomSheet();
|
||||
Bundle args = new Bundle();
|
||||
args.putStringArrayList(SELECTED_KEYS, selectedProfiles != null ?
|
||||
new ArrayList<>(selectedProfiles) : new ArrayList<String>());
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
|
@ -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<String> {
|
|||
@Override
|
||||
public void onClick(View v) {
|
||||
List<String> selectedProfilesKeys = new ArrayList<>(adapter.getItemsList());
|
||||
SelectMultipleProfileBottomSheet.showInstance(activity, selectedProfilesKeys,
|
||||
SelectMultipleProfilesBottomSheet.showInstance(activity, selectedProfilesKeys,
|
||||
selectedProfilesKeys, false, new CallbackWithObject<List<String>>() {
|
||||
@Override
|
||||
public boolean processResult(List<String> result) {
|
||||
|
|
Loading…
Reference in a new issue