Widget size = (74dip*cells)-2 does not work in JellyBean
-
20-06-2021 - |
Question
I have serious issues with my widget.
I used this xml file:
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:initialLayout="@layout/widget_layout"
android:minHeight="72dp"
android:minWidth="146dp" >
</appwidget-provider>
and I am expecting a height of 1 cell and a width of 2.
Unfortunately, onJellyBean only, the widget is listed as a 3*2 widget and is totally ugly..
Is there something I missed?
La solution
They changed the widget sizes in Android 4 (maybe Android 3).
1 cell is now 40dp and 2 cells is 110dp.
Read here:
http://developer.android.com/guide/practices/ui_guidelines/widget_design.html#anatomy
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow