This commit is contained in:
androiddevkkotlin 2020-12-07 13:43:52 +02:00
parent 842c4b0f99
commit f42bbe7a31
2 changed files with 5 additions and 1 deletions

View file

@ -271,6 +271,7 @@ public class RouteOptionsBottomSheet extends MenuBottomSheetDialogFragment {
R.layout.bottom_sheet_item_with_switch_and_dialog, null, false);
final SwitchCompat switchButton = itemView.findViewById(R.id.switchWidget);
View itemsContainer = itemView.findViewById(R.id.selectable_list_item);
switchButton.setChecked(!active);
switchButton.setFocusable(false);
itemsContainer.setOnClickListener(new View.OnClickListener() {
@Override
@ -292,7 +293,6 @@ public class RouteOptionsBottomSheet extends MenuBottomSheetDialogFragment {
});
item[0] = (BottomSheetItemWithCompoundButton) new BottomSheetItemWithCompoundButton.Builder()
.setChecked(!active)
.setCompoundButtonColorId(selectedModeColorId)
.setDescription(getElevationDescription(parameter))
.setIcon(getContentIcon(active ? parameter.getActiveIconId() : parameter.getDisabledIconId()))

View file

@ -21,6 +21,7 @@ import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithCompoundButton;
import net.osmand.plus.base.bottomsheetmenu.simpleitems.DividerSpaceItem;
import net.osmand.plus.base.bottomsheetmenu.simpleitems.LongDescriptionItem;
import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem;
import net.osmand.plus.routepreparationmenu.RouteOptionsBottomSheet;
import net.osmand.plus.settings.backend.ApplicationMode;
import net.osmand.plus.settings.backend.CommonPreference;
import net.osmand.plus.settings.fragments.ApplyQueryType;
@ -181,6 +182,9 @@ public class ElevationDateBottomSheet extends MenuBottomSheetDialogFragment {
if (target instanceof BaseSettingsFragment) {
((BaseSettingsFragment) target).updateSetting(useHeightPref.getId());
}
if (target instanceof RouteOptionsBottomSheet) {
((RouteOptionsBottomSheet) target).updateParameters();
}
updateReliefButtons();
app.runInUIThread(new Runnable() {
@Override