/ / Androidのスクロールビューはランドスケープモードでの相対的なレイアウトではありません - アンドロイド、レイアウト

Androidのスクロールビューは、横向きモードの相対レイアウトでは使用できません - Android、レイアウト

横向きになっているときにAndroidビューをスクロールさせようとしています。しかし、これは私が試したことのある機器ではうまくいきません。これが私のマークアップだ。

    <ScrollView
android:layout_height="fill_parent"
android:layout_width="fill_parent">
<RelativeLayout
android:id="@+id/sample1"
android:gravity="top"
android:layout_height="fill_parent"
android:layout_width="fill_parent">
<ImageView
android:src="@drawable/sample1"
android:layout_centerHorizontal="true"
android:layout_width="fill_parent"
android:padding="10dp"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"/>
</RelativeLayout>
</ScrollView>
<LinearLayout android:id="buttons"
xmlns:android="schemas.android.com/apk/res/android";
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_alignParentBottom="true" android:padding="3dp">
...
</LinearLayout>

更新:この見解に含まれている追加の線形レイアウトがあります。私はこれが問題であるかもしれないと思います。何か考え?

回答:

回答№1は0

このコードに問題はありません。私は "それを試してみました 768x1024 mdpiのdrawableフォルダに置かれたjpg。あなたが使用した画像の解像度は何ですか?レイアウトにTextViewや他のビューが埋め込まれていないことを確認していますか?

代替テキスト