I am creating an appWidget with multiple views and flipping views. Basically, it works. But I have no idea how I can programmatically override the view in RemoteViews.
this is the xml layout for flipping
<ViewFlipper android:id="@+id/vf_slot_0" android:layout_width="fill_parent" android:layout_height="75dp" android:autoStart="true" android:flipInterval="10000">
and this is the code
RemoteViews mViews = new RemoteViews(context.getPackageName(), R.id.flipping_view); mViews.setBoolean(R.id.vf_slot_0, "setAutoStart", false); mViews.setInt(R.id.vf_slot_0, "setFlipInterval", 1000);
'setFlipInterval' works. I can change the drop interval programmatically using this code. But "setAutoStart" is not. And get this error.
08-19 01:45:38.821: WARN/AppWidgetHostView(2889): android.widget.RemoteViews$ActionException: view: android.widget.ViewFlipper can't use method with RemoteViews: setAutoStart(boolean)
I wonder why I cannot use 'setAutoStart' while I can use 'setFlipInterval'. Is there any way I can start or stop flipping images in an appWidget application?
source share