ウィジェットに問題が発生しました。Destop (例: 3x3 サイズ) に配置すると、ウィジェットを長押しすると、次のサイズ変更フレームが表示されます。
大丈夫です。しかし、電話の向きを水平に変更すると、次のようになりました。
ウィジェットが小さくなり、サイズ変更フレームが広くなりました
私が測定したように、ウィジェットの幅はウィジェットの高さの前の向きと同じです。
では、サイズ変更フレームを少し小さくして、画面に追加のスペースを確保しましょう。
電話の向きをもう一度変更して、次の操作を行います。
ウィジェットのサイズがまたもやお粗末。
私は何を間違っていますか?
これが私のマニフェストです
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="at.widget.twil.jacob"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8"/>
<application
android:allowBackup="false"
android:icon="@drawable/icon"
android:label="@string/app_name"
android:configChanges="orientation|screenSize">
<receiver
android:label="@string/small_name"
android:name="MyWidgetProvidersmall"
android:icon="@drawable/icon">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_info_small" />
</receiver>
<receiver
android:label="@string/medium_name"
android:name="MyWidgetProvidermedium"
android:icon="@drawable/icon">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_info_medium" />
</receiver>
<receiver
android:label="@string/large_name"
android:name="MyWidgetProviderlarge"
android:icon="@drawable/icon">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_info_large" />
</receiver>
</application>
</manifest>
レイアウト.xml
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
android:orientation="vertical"
android:id="@id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView
android:id="@id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="false"
android:scaleType="centerInside"
android:src="@drawable/sticker" />
</FrameLayout>
および異なるサイズ (1x1 2x2 3x3) の情報ファイルの 1 つ
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider
xmlns:android="http://schemas.android.com/apk/res/android"
android:updatePeriodMillis="0"
android:initialLayout="@layout/widget_layout"
android:minHeight="@dimen/AppWidget_3Cell"
android:minWidth="@dimen/AppWidget_3Cell"
android:resizeMode="horizontal|vertical" />
何か提案はありますか?ありがとう。アマリア。