Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What sizes to use for a 4x2 appwidget

I'm trying to create an appwidget that has a standard size of 4x2 tiles. Currently, I'm using these values:

android:minHeight="146dp"
android:minWidth="294dp"

On my Desire running Gingerbread, the widget shows as 4x2.
On my Asus TF101 tablet running ICS, the widget gets a size of 4x2.
Finally, in an emulator 720x1280 running ICS, the widget gets a size of 4x3.

So I'm a bit confused here. What are the correct values (perhaps using different resource folders) to achieve a 4x2 widget on all devices?

like image 400
nhaarman Avatar asked Jul 16 '12 13:07

nhaarman


1 Answers

I've found that working on approx. 72dp x 72dp per 1x1 works best. So for a 2x2 widget I would normally use 144dp x 144dp, however google recommends 110dp x 110dp.

This page from Google gives a better description of what size to use and how to calculate it: http://developer.android.com/guide/practices/ui_guidelines/widget_design.html

like image 164
hyarion Avatar answered Oct 09 '22 05:10

hyarion