I have a home screen widget that uses setBoolean to enable or disable components in the widget. It works just fine in Froyo and GingerBread but it is giving me exceptions on HoneyComb Basically I have this line:
views.setBoolean(R.id.s_button, "setEnabled", true); When I run it on HoneyComb i get this: W/AppWidgetHostView(21613): updateAppWidget couldn't find any view, using error view W/AppWidgetHostView(21613): android.widget.RemoteViews$ActionException: view: android.widget.Button can't use method with RemoteViews: setEnabled(boolean) W/AppWidgetHostView(21613): at android.widget.RemoteViews$ReflectionAction.apply(RemoteViews.java:778) W/AppWidgetHostView(21613): at android.widget.RemoteViews.performApply(RemoteViews.java:1515) W/AppWidgetHostView(21613): at android.widget.RemoteViews.apply(RemoteViews.java:1492) W/AppWidgetHostView(21613): at android.appwidget.AppWidgetHostView.updateAppWidget(AppWidgetHostView.java:225) W/AppWidgetHostView(21613): at android.appwidget.AppWidgetHost.createView(AppWidgetHost.java:234) W/AppWidgetHostView(21613): at com.android.launcher2.Launcher.completeAddAppWidget(Launcher.java:1353) W/AppWidgetHostView(21613): at com.android.launcher2.Launcher.addAppWidgetImpl(Launcher.java:1858) W/AppWidgetHostView(21613): at com.android.launcher2.Launcher.addAppWidgetFromDrop(Launcher.java:1802) W/AppWidgetHostView(21613): at com.android.launcher2.Workspace.onDropExternal(Workspace.java:2754) W/AppWidgetHostView(21613): at com.android.launcher2.Workspace.addExternalItemToScreen(Workspace.java:2726) W/AppWidgetHostView(21613): at com.android.launcher2.Launcher.addExternalItemToScreen(Launcher.java:3228) W/AppWidgetHostView(21613): at com.android.launcher2.CustomizePagedView$3.onAnimationEnd(CustomizePagedView.java:390) W/AppWidgetHostView(21613): at android.animation.ValueAnimator.endAnimation(ValueAnimator.java:999) W/AppWidgetHostView(21613): at android.animation.ValueAnimator.access$800(ValueAnimator.java:42) W/AppWidgetHostView(21613): at android.animation.ValueAnimator$AnimationHandler.handleMessage(ValueAnimator.java:646) W/AppWidgetHostView(21613): at android.os.Handler.dispatchMessage(Handler.java:99) W/AppWidgetHostView(21613): at android.os.Looper.loop(Looper.java:126) W/AppWidgetHostView(21613): at android.app.ActivityThread.main(ActivityThread.java:4002) W/AppWidgetHostView(21613): at java.lang.reflect.Method.invokeNative(Native Method) W/AppWidgetHostView(21613): at java.lang.reflect.Method.invoke(Method.java:491) W/AppWidgetHostView(21613): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844) W/AppWidgetHostView(21613): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602) W/AppWidgetHostView(21613): at dalvik.system.NativeStart.main(Native Method) and the Widget never shows up. According to the RemoteViews documentation setBoolean is supported since API level 3 does anybody knows if it is broken or is there another way to accomplish this? I would appreciate any help on this issue :) Thanks -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

