I have an app with a widget but I am having some difficulty with the layout of the widget.
The basic idea if the widget should look like an icon and have a little text tag under it like any other icon on the desktop.
I found one example which uses an android:background for the TextView and uses a drawable XML:
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#AA111111"/>
<padding android:left="5dp"
android:right="5dp"
android:bottom="1dp"
android:top="1dp" />
<corners android:radius="8dp" />
</shape>
However this does not work brilliantly, the text just isn't the same as the other icons on the desktop and when you rotate the phone part of the text is chopped off!
The next problem is selecting the widget, I use an ImageButton as the icon - with the android:background set to a transparent image. I have been using another drawable xml file which allows me to change the image when the widget is selected. However I would prefer the default action of an icon, where the square around the icon turns orange.
How would I achive these two effect - I know it is possible somehow as the app "sms unread count" achives exactly what I want to happen!