fix build

This commit is contained in:
sonora 2014-08-29 02:17:41 +02:00
parent 38af1f4e1f
commit fe774b6259

View file

@ -181,9 +181,8 @@ 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){
Field f = R.drawable.class.getField("widget_no_icon");
icon = f.getInt(null);
} }
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() {
@ -201,9 +200,8 @@ 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){
Field f = R.drawable.class.getField("widget_no_icon");
icon = f.getInt(null);
} }
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() {