introduce blank icon for new rendering Properties
This commit is contained in:
parent
fe774b6259
commit
506e9b349c
1 changed files with 10 additions and 2 deletions
|
@ -181,8 +181,12 @@ public class AppearanceWidgetsFactory {
|
||||||
try {
|
try {
|
||||||
Field f = R.drawable.class.getField("widget_" + p.getAttrName().toLowerCase());
|
Field f = R.drawable.class.getField("widget_" + p.getAttrName().toLowerCase());
|
||||||
icon = f.getInt(null);
|
icon = f.getInt(null);
|
||||||
//TODO: Use "widget_no_icon" where no widget icon exists
|
|
||||||
} catch(Exception e){
|
} 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);
|
MapWidgetRegistry.MapWidgetRegInfo w = mapInfoControls.registerAppearanceWidget(icon, propertyName, "rend_"+p.getAttrName(), pref, categoryName);
|
||||||
w.setStateChangeListener(new Runnable() {
|
w.setStateChangeListener(new Runnable() {
|
||||||
|
@ -200,8 +204,12 @@ public class AppearanceWidgetsFactory {
|
||||||
try {
|
try {
|
||||||
Field f = R.drawable.class.getField("widget_" + p.getAttrName().toLowerCase());
|
Field f = R.drawable.class.getField("widget_" + p.getAttrName().toLowerCase());
|
||||||
icon = f.getInt(null);
|
icon = f.getInt(null);
|
||||||
//TODO: Use "widget_no_icon" where no widget icon exists
|
|
||||||
} catch(Exception e){
|
} 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);
|
MapWidgetRegistry.MapWidgetRegInfo w = mapInfoControls.registerAppearanceWidget(icon, propertyName, "rend_"+p.getAttrName(), pref, categoryName);
|
||||||
w.setStateChangeListener(new Runnable() {
|
w.setStateChangeListener(new Runnable() {
|
||||||
|
|
Loading…
Reference in a new issue