문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top