test old descr as title in Configure screen submenus

This commit is contained in:
sonora 2012-09-03 21:44:23 +02:00
parent 2b036eacf6
commit 51b984d318

View file

@ -347,6 +347,8 @@ public class MapInfoLayer extends OsmandMapLayer {
final OsmandApplication app = view.getApplication(); final OsmandApplication app = view.getApplication();
for (final RenderingRuleProperty p : renderer.PROPS.getCustomRules()) { for (final RenderingRuleProperty p : renderer.PROPS.getCustomRules()) {
String propertyName = SettingsActivity.getStringPropertyName(view.getContext(), p.getAttrName(), p.getName()); String propertyName = SettingsActivity.getStringPropertyName(view.getContext(), p.getAttrName(), p.getName());
//test old descr as title
String propertyDescr = SettingsActivity.getStringPropertyDescription(p.getAttrName(), p.getName());
if(p.isBoolean()) { if(p.isBoolean()) {
final CommonPreference<Boolean> pref = view.getApplication().getSettings().getCustomRenderBooleanProperty(p.getAttrName()); final CommonPreference<Boolean> pref = view.getApplication().getSettings().getCustomRenderBooleanProperty(p.getAttrName());
int icon = 0; int icon = 0;
@ -378,6 +380,8 @@ public class MapInfoLayer extends OsmandMapLayer {
@Override @Override
public void run() { public void run() {
Builder b = new AlertDialog.Builder(view.getContext()); Builder b = new AlertDialog.Builder(view.getContext());
//test old descr as title
b.setTitle(propertyDescr);
int i = Arrays.asList(p.getPossibleValues()).indexOf(pref.get()); int i = Arrays.asList(p.getPossibleValues()).indexOf(pref.get());
b.setSingleChoiceItems(p.getPossibleValues(), i, new OnClickListener() { b.setSingleChoiceItems(p.getPossibleValues(), i, new OnClickListener() {
@Override @Override