This commit is contained in:
Nazar-Kutz 2020-07-20 19:27:27 +03:00
parent 724ef4bf09
commit 2aa3d03af6

View file

@ -20,6 +20,7 @@ import net.osmand.plus.ContextMenuItem;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.activities.SettingsActivity;
import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem;
import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemTwoChoicesButton;
import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemTwoChoicesButton.OnBottomBtnClickListener;
@ -124,6 +125,7 @@ public class DetailsBottomSheet extends BasePreferenceBottomSheet {
for (int i = 0; i < properties.size(); i++) {
RenderingRuleProperty property = properties.get(i);
final CommonPreference<Boolean> pref = preferences.get(i);
final String propertyName = SettingsActivity.getStringPropertyName(app, property.getAttrName(), property.getName());
if (STREET_LIGHTING.equals(property.getAttrName()) && streetLightNightProp != null) {
final CommonPreference<Boolean> streetLightsNightPref = preferences.get(properties.indexOf(streetLightNightProp));
final BottomSheetItemTwoChoicesButton[] item = new BottomSheetItemTwoChoicesButton[1];
@ -139,7 +141,7 @@ public class DetailsBottomSheet extends BasePreferenceBottomSheet {
})
.setCompoundButtonColorId(selectedProfileColorRes)
.setChecked(pref.get())
.setTitle(property.getName())
.setTitle(propertyName)
.setIconHidden(true)
.setLayoutId(R.layout.bottom_sheet_item_two_choices)
.setOnClickListener(new View.OnClickListener() {
@ -160,7 +162,7 @@ public class DetailsBottomSheet extends BasePreferenceBottomSheet {
item[0] = (BottomSheetItemWithCompoundButton) new BottomSheetItemWithCompoundButton.Builder()
.setCompoundButtonColorId(selectedProfileColorRes)
.setChecked(pref.get())
.setTitle(property.getName())
.setTitle(propertyName)
.setIconHidden(true)
.setLayoutId(R.layout.bottom_sheet_item_with_switch)
.setOnClickListener(new View.OnClickListener() {