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. How to get the currently foreground activity class name?

Hi, does any one konw how to get the currently foreground activity
class name?  In my project, I need  get the info of the foreground
activity, not only my own application, but also the third party


2. How to play Video files from MediaStore

Hi everybody..
 Can anyone help me in this?
I would like to list the video files available in the provider and
playing according to user selection.



3. who can tell me how to achieve this function?! thx!

4. Where is the source code for "Pictures" app

5. Please help! Having problem with wave locked service. it still going sleeping.

6. Displaying image from internet source

7. Displaying Dialog with no dim on background window.