When using Activities
you can easily select the layout
to be used as you wish in the onCreate()
via setContentView()
. But how do I accomplish this on an app widget? As far as I know the app widget's layout is determined by the corresponding AppWidgetProviderInfo.xml
, which isn't configurable at runtime, is it?
So how can I select a specific layout depending on the device's version of Android?