5

My android application (Banner) uses widgets sizes from 1x1 to 8x1. I'm getting annoyed with trying to get the magic minWidth set in the XML appwidget-provider files.

Old school method to get widget minimum size was something like [74 x (n) - 2]. Now the method is [70 x (n) - 30]. Neither of these work well past 3x1 widgets. 4x1 if set correctly on a phone usually becomes a 3x1 widget on tablets because of dpi/density/size, etc.

So I ended up placing xml files as such to adjust width as needed. However, I'm really only guessing that the increased minWidth works with all devices as I only tested on my own tablet.

So my question is this... has anyone figured out the BEST minWidths or methods for making widgets on different device sizes, etc?

enter image description here

4

0 回答 0