*At the activity*
To change the properties of the resources we need an view instance of that
particular resource.**
And to find the view instance for the resources attached with in an
activity, we use findViewById() api
Ex: private ImageView mView;
mView=(ImageView) findViewById(R.id.image);
mView.setBackgroundColor(color);
*At the widget*
To attain the same requirement at the widget, we can use the instance of
RemoteViews .
Ex: RemoteViews remoteViews = new
RemoteViews(context.getPackageName(), R.layout.main);
remoteViews.setInt(R.id.imageView, “setBackgroundColor”,
color);
*Solution required:*
But instance of RemoteViews is not of type View . So is there any approach
to get the view instance as this findViewById api is restricted towards
activity side and that to within the onCreate() method only.
--
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