introduce blank icon for new rendering Properties

This commit is contained in:
sonora 2014-08-29 02:36:54 +02:00
parent fe774b6259
commit 506e9b349c

View file

@ -181,8 +181,12 @@ public class AppearanceWidgetsFactory {
try {
Field f = R.drawable.class.getField("widget_" + p.getAttrName().toLowerCase());
icon = f.getInt(null);
//TODO: Use "widget_no_icon" where no widget icon exists
} catch(Exception e){
try {
Field f = R.drawable.class.getField("widget_no_icon");
icon = f.getInt(null);
} catch(Exception e){
}
}
MapWidgetRegistry.MapWidgetRegInfo w = mapInfoControls.registerAppearanceWidget(icon, propertyName, "rend_"+p.getAttrName(), pref, categoryName);
w.setStateChangeListener(new Runnable() {
@ -200,8 +204,12 @@ public class AppearanceWidgetsFactory {
try {
Field f = R.drawable.class.getField("widget_" + p.getAttrName().toLowerCase());
icon = f.getInt(null);
//TODO: Use "widget_no_icon" where no widget icon exists
} catch(Exception e){
try {
Field f = R.drawable.class.getField("widget_no_icon");
icon = f.getInt(null);
} catch(Exception e){
}
}
MapWidgetRegistry.MapWidgetRegInfo w = mapInfoControls.registerAppearanceWidget(icon, propertyName, "rend_"+p.getAttrName(), pref, categoryName);
w.setStateChangeListener(new Runnable() {