I created an XML file for an AppWidget as shown below.
xml/appwidget_4x1.xml
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:minWidth="@dimen/AppWidget_4Cell"
android:minHeight="@dimen/AppWidget_1Cell"
android:updatePeriodMillis="0"
android:previewImage="@drawable/appwidget_4x1_preview"
android:initialLayout="@layout/appwidget_4x1_loading"
android:resizeMode="horizontal"
android:minResizeWidth="@dimen/AppWidget_3Cell" />
The problem is in Android 1.6 it apparently doesn't like me using the @dimen statements for the minWidth and minHeight. When this happens and the user drops an AppWidget on the screen it says, "No more room on this home screen." If I use the dimensions explicitly it starts working again.
res/values/dimens.xml (1.6 - 3.2)
<dimen name="AppWidget_1Cell">72dp</dimen>
<dimen name="AppWidget_4Cell">294dp</dimen>
res/values-v14/dimens.xml (4.0+)
<dimen name="AppWidget_1Cell">40dp</dimen>
<dimen name="AppWidget_4Cell">250dp</dimen>
Is this a bug and if so what's the work around for this? I did it this way to follow the recommendations for Ice Cream Sandwich's new widget layout dimensions.