I have a widget in Android for which I am setting a previewImage. Unfortunately, I am having issues figuring the good size for the widget: if it's too big, it gets cropped at the bottom of the frame.
I have been trying to find the recommended size, or even better, the pixel dimensions of this frame where the preview image gets displayed, but I cannot find it in the documentation.
Does anyone please know where to look for that information please?
Thank you.
The emulator has an application for creating a preview with just the right size:
http://developer.android.com/guide/topics/appwidgets/index.html#preview
My suggestion would be to grab a previewImage of your widget with that application and then look at the size.
According my tests widget preview is connected to widget XML file.
widget preview for widget 1x1:
picture size: width=138pixels, height=138pixels
xml file definition: android:minHeight="50dp", android:minWidth="50dp"
widget preview for widget 2x1:
picture size: width=236pixels, height=138pixels
xml file definition: android:minHeight="50dp", android:minWidth="120dp"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With