How do I add a View (dynamically) in an android widget? (API-level 3)
How do I add a View dynamically in an android widget?
I realize that the RemoteViews works as a container of updates, but the RemoteViews.addView is only available on API level 7 (and I want my widget to work on HTC Hero phones, which has API level开发者_Python百科 3).
In your AppWidgetProvider
, when you create your RemoteViews
instance to do an update, you pass in a layout ID to the constructor. If you want your app widget to have different contents, pass in a different layout ID.
精彩评论