Merge pull request #11461 from osmandapp/transliterate_ui
Fix transliterate switch in map language dialog
This commit is contained in:
commit
465ec91344
1 changed files with 2 additions and 1 deletions
|
@ -530,7 +530,7 @@ public class ConfigureMapMenu {
|
||||||
TextView switchText = (TextView) v.findViewById(R.id.switchText);
|
TextView switchText = (TextView) v.findViewById(R.id.switchText);
|
||||||
switchText.setText(activity.getString(R.string.translit_name_if_miss, txtValues[position]));
|
switchText.setText(activity.getString(R.string.translit_name_if_miss, txtValues[position]));
|
||||||
SwitchCompat check = (SwitchCompat) v.findViewById(R.id.check);
|
SwitchCompat check = (SwitchCompat) v.findViewById(R.id.check);
|
||||||
check.setChecked(settings.MAP_TRANSLITERATE_NAMES.isSet() ? transliterateNames : txtIds[position].equals("en"));
|
check.setChecked(transliterateNames);
|
||||||
check.setOnCheckedChangeListener(translitChangdListener);
|
check.setOnCheckedChangeListener(translitChangdListener);
|
||||||
UiUtilities.setupCompoundButton(nightMode, selectedProfileColor, check);
|
UiUtilities.setupCompoundButton(nightMode, selectedProfileColor, check);
|
||||||
} else {
|
} else {
|
||||||
|
@ -548,6 +548,7 @@ public class ConfigureMapMenu {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
selectedLanguageIndex = which;
|
selectedLanguageIndex = which;
|
||||||
|
transliterateNames = settings.MAP_TRANSLITERATE_NAMES.isSet() ? transliterateNames : txtIds[which].equals("en");
|
||||||
((AlertDialog) dialog).getListView().setSelection(which);
|
((AlertDialog) dialog).getListView().setSelection(which);
|
||||||
singleChoiceAdapter.notifyDataSetChanged();
|
singleChoiceAdapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue