I am currently developing an appwidget and unfortunately it does not fits in phone with bigger screen sizes. How can I ensure that the appwidget has full width for all types of phones?
At first I thought this could be done by using width="fill_parent"
but it does not work.. The widget does not fill the width of the phone ( I am not sure whether it is based on the minWidth under xml folder )
I've also tried adding layout-sw480dp,layout-sw600dp,layout-sw720dp
and it still doesn't work...
The appwidget just won't fill the full width of the phone..
Any help is much appreciated!
Size of App Widget is rounded to neerest grid size, so it might be good idea to set minWidth to large value. Unfortunatelly it will not work. If you try it, your widget will not show in list of widgets to add to homescreen.
You would just calculate width for 4 cells by formula from docs: 70 * cells - 30
, so it would be 250dp. The problem is, on bigger screens, with large density, home screens are wider than 4 cells. I think you could just create multiple widgets with different width, or just make your widget resizable.
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