It might be me, but when I calculate minimum app widget sizes according to the formula given on the android page I don’t get the right widget widths; The formula is as follows:
width(n) = (70 x n) – 30
When I want to have a 5×1 widget, the correct width would be (5 * 70) – 30 = 320dp. However when testing this on a motorola Xoom it resolves to being a 4×1 widget. I’ve tested different values and 400dp seems good for 5×1 on the motorola xoom with Honeycomb, but then I’d test it on a regular Galaxy Tab with Gingerbread and then it resolves to a 6×1 (like one would expect).
So two questions here;
- What difference between Gingerbread and Honeycomb am I overlooking?
- Since I know ICS widget size no longer has padding between widgets, is there some rule of thumb here as well?
Not too many devices fully follow Google’s advised formula. You’re better off using several xml-xxx folders that can specify more accurate minWidth & minHeight that correspond to the varying screens & OSes.
Right now I four solely based on OS:
But as I fine tune, I may have to add a few new folders for particular dpis or screens.
Quick update:
Only some devices use automatic padding. Samsung & HTC have custom UIs that use full-width widgets, so they override the OS padding on their launchers.