How to hide Widget If not supported by Android API? -



developing multiple widgets, 1 of them uses listview listview not supported android 2.3.
so, if app installed in android 2.3 @ time widget listview should not display in widget's list.
widget listview showing in widget's list , if click on shows me force closed.

that's why want hide widgets widget's list.
if 1 has suggestions please reply.

shows me force closed , following error widget
enter image description here

same widget run in android 4.2 shows me per following list

enter image description here

thank you.

i developing multiple widgets

no, developing multiple app widgets. while sorry terms confusing, important use right terminology in question.

one of them uses listview listview not supported android 2.3.

correct, listview not supported in app widgets in android 2.3 or lower.

so, if app installed in android 2.3 @ time widget listview should not display in widget's list.

step #1: create res/values/bools.xml file, defining boolean resource, name of is_honeycomb, , value of false.

step #2: create res/values-v11/bools.xml file, defining boolean resource, same name (is_honeycomb), , value of true

step #3: in manifest, on <receiver> element appwidgetprovider uses listview, add android:enabled="@bool/is_honeycomb".

the net effect on android 3.0+ devices, listview app widget available option, on android 2.3 , lower devices, not.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -