Problems with calling method within RemoteViews object

by Romain Guy » Sun, 29 Nov 2009 12:20:50 GMT

Sponsored Links
 Not all View methods can be used on RemoteViews.

During creation of Widget views(RemoteViews) I'm trying to set
"actions" for inner View objects such as ImageView, LinearLayout and
others. But some calls are being processed correct but others are
throw exceptions. Simple code from update widget method example is

RemoteViews widgetViews = new RemoteViews(context.getPackageName(),

//this call is correct
widgetViews.setInt(, "setVisibility",

//the following code writing to LogCat
//updateAppWidget couldn't find any view, using error view
//android.widget.LinearLayout can't use method with //RemoteViews:
widgetViews.setInt(, "setBackgroundResource",


Other Threads

1. Possible bug in Market? (about versionCode)

I get the following error when i try to upload a new .apk:

The new apk's versionCode (1) in AndroidManifest.xml must be higher
than the old apk's versionCode (1).

But the version code is set to 2. Is this a bug with someone, or just
'by design' until the comments/ratings bug is fixed?


2. g1 keyboard missing up/down/left/right keys?

I set up my g1 phone to test the Snake sample came with the Android
SDK. The application requires up/down/left/right keys, but they not
available on the g1 keyboard - did I miss it?

I changed the code to use I, K, J, L keys instead. It works when I
have the device connect to to the computer with Eclipse running. But
the app stops working when I unplugged it from the computer. Is it
because I didn't do a release build? How?

I know, two questions!  Thanks!!!


3. Download Count Reset on App Upgrade in Android Market

4. Invoking the web browser from my app

5. Is there a way to increase the G1's default screen timeout during a call?

6. First Run Method

7. Logistics, bike messenger