Reputation: 3288
I am developing an application that supports widget sizes 4x1, 4x2 and 5x2. Everything works well except that the 4x1 widget takes the size of a 4x2widget. I have checked the widget provide file and it seems ok:
The layout also is ok (I Have tried changing its width and height to fill_parent as some other people suggested) but whatever I did, when I put it on the home screen, it has a 4x1 size but it is centered vertically on a 4x2 size on the screen. It is like the size of the layout is correct (I have added a background color to see how high it is) but something is forcing the widget to size 4x2.
Anyone know what the problem could be?
Upvotes: 0
Views: 13385
Reputation: 191
May be a late reply but Google seems to have changed the formula for Widget Dimension to (n * 70) - 30.
Upvotes: 2
Reputation: 508
The minWidth and minHeight have to be 72 dp per 1x1 block for widgets. You most likeley have something else than 72 dp, and everything inbeetween 144 and 73 dp makes it use 2 blocks in instead of 1.
Upvotes: 4