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
below.


RemoteViews widgetViews = new RemoteViews(context.getPackageName(),
               R.layout.widget_layout);

//this call is correct
widgetViews.setInt(R.id.ClientLayout05, "setVisibility",
View.INVISIBLE);


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

--



Other Threads

1. Android Dev1 Phone network access via USB connection

Hi,

I'm considering to buy the dev1 phone but I would like to know if
accessing the network through the USB connection works out of the
box.
Basically, the scenario would be the following:

A desktop computer, no wireless nearby and no active data SIM card.
Connecting the phone to the computer with the USB cable allows the
phone to access to the network the computer is on?.


Thank you very much in advance.

--~--~---------~--~----~------------~-------~--~----~

2. Easy one (hopefully) Inverse preference dependency?

1) invert the preference "question" for the dependency.
2) If you convert your preference from XML to code, you may have more
flexibility.

(You have probably considered both and neither is a good option for
you...)
Jim


On May 22, 12:14am, "Peter Carpenter"


--~--~---------~--~----~------------~-------~--~----~

3. Contacts Mutliple Selection Intent

4. Android REST Client (jsr311)

5. sdk version

6. adt export wizard

7. Problem with eclipse pointing to the SDK