携帯電話にインストールした後 (エミュレーターでも発生します)、ウィジェットは 1x1 セルのみです。
アプリを完全にアンインストールしてから再度インストールしようとしましたが、ウィジェットのインスタンスを作成しても、ウィジェットはまだ 1x1 セルしかありません。
何か案は?
これが私のプロバイダー情報 XML ファイル (callernator_widget_provider_info.xml) です。
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android">
android:minWidth="294dp"
android:minHeight="294dp"
android:updatePeriodMillis="86400000"
android:initialLayout="@layout/widgetmain"
</appwidget-provider>
レイアウトファイルは次のとおりです。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linearLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<Button
android:id="@+id/button1"
android:layout_width="fill_parent"
android:layout_height="32dp"
android:text="Bertus van Zyl" />
<Button
android:id="@+id/button2"
android:layout_width="fill_parent"
android:layout_height="32dp"
android:text="Button" />
<Button
android:id="@+id/button3"
android:layout_width="fill_parent"
android:layout_height="32dp"
android:text="Button" />
</LinearLayout>
ここに私のマニフェストファイルがあります:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="android.callernator"
android:versionCode="1"
android:versionName="1.0">
<uses-permission
android:name="android.permission.READ_CONTACTS">
</uses-permission>
<application android:icon="@drawable/icon" android:label="@string/app_name">
<receiver android:name=".CallernatorWidgetProvider" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data android:name="android.appwidget.provider" android:resource="@xml/callernator_widget_provider_info" />
</receiver>
<activity android:name=".CallernatorActivity" android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>