Skip to main content

Posts

Showing posts from December, 2012

PreviewImage not showing up in widget list on android?

Few things to keep in mind when you're trying to set a preview image for your android widget: Set the android:icon attribute on the corresponding receiver in your AndroidManifest.xml to the same drawable as the one mentioned in the android:previewImag e attribute of your widget.xml file. Don't use too big (when it comes to resolution) preview images, as android anyway will scale them up. As a rule of thumb I've noticed that I have to scale down preview images (from their original size after doing screenshot in ddms) to 75% for small widgets (taking 1 row) and approx 50% for full screen widgets. Otherwise you'll get error saying that the widget dragging couldn't be initialized. Most widgets anyway don't use preview, so don't worry about it too much :)