Fix bugs
This commit is contained in:
parent
842c4b0f99
commit
f42bbe7a31
2 changed files with 5 additions and 1 deletions
|
@ -271,6 +271,7 @@ public class RouteOptionsBottomSheet extends MenuBottomSheetDialogFragment {
|
||||||
R.layout.bottom_sheet_item_with_switch_and_dialog, null, false);
|
R.layout.bottom_sheet_item_with_switch_and_dialog, null, false);
|
||||||
final SwitchCompat switchButton = itemView.findViewById(R.id.switchWidget);
|
final SwitchCompat switchButton = itemView.findViewById(R.id.switchWidget);
|
||||||
View itemsContainer = itemView.findViewById(R.id.selectable_list_item);
|
View itemsContainer = itemView.findViewById(R.id.selectable_list_item);
|
||||||
|
switchButton.setChecked(!active);
|
||||||
switchButton.setFocusable(false);
|
switchButton.setFocusable(false);
|
||||||
itemsContainer.setOnClickListener(new View.OnClickListener() {
|
itemsContainer.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -292,7 +293,6 @@ public class RouteOptionsBottomSheet extends MenuBottomSheetDialogFragment {
|
||||||
});
|
});
|
||||||
|
|
||||||
item[0] = (BottomSheetItemWithCompoundButton) new BottomSheetItemWithCompoundButton.Builder()
|
item[0] = (BottomSheetItemWithCompoundButton) new BottomSheetItemWithCompoundButton.Builder()
|
||||||
.setChecked(!active)
|
|
||||||
.setCompoundButtonColorId(selectedModeColorId)
|
.setCompoundButtonColorId(selectedModeColorId)
|
||||||
.setDescription(getElevationDescription(parameter))
|
.setDescription(getElevationDescription(parameter))
|
||||||
.setIcon(getContentIcon(active ? parameter.getActiveIconId() : parameter.getDisabledIconId()))
|
.setIcon(getContentIcon(active ? parameter.getActiveIconId() : parameter.getDisabledIconId()))
|
||||||
|
|
|
@ -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.DividerSpaceItem;
|
||||||
import net.osmand.plus.base.bottomsheetmenu.simpleitems.LongDescriptionItem;
|
import net.osmand.plus.base.bottomsheetmenu.simpleitems.LongDescriptionItem;
|
||||||
import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem;
|
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.ApplicationMode;
|
||||||
import net.osmand.plus.settings.backend.CommonPreference;
|
import net.osmand.plus.settings.backend.CommonPreference;
|
||||||
import net.osmand.plus.settings.fragments.ApplyQueryType;
|
import net.osmand.plus.settings.fragments.ApplyQueryType;
|
||||||
|
@ -181,6 +182,9 @@ public class ElevationDateBottomSheet extends MenuBottomSheetDialogFragment {
|
||||||
if (target instanceof BaseSettingsFragment) {
|
if (target instanceof BaseSettingsFragment) {
|
||||||
((BaseSettingsFragment) target).updateSetting(useHeightPref.getId());
|
((BaseSettingsFragment) target).updateSetting(useHeightPref.getId());
|
||||||
}
|
}
|
||||||
|
if (target instanceof RouteOptionsBottomSheet) {
|
||||||
|
((RouteOptionsBottomSheet) target).updateParameters();
|
||||||
|
}
|
||||||
updateReliefButtons();
|
updateReliefButtons();
|
||||||
app.runInUIThread(new Runnable() {
|
app.runInUIThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue