我試圖做一個橫向的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>
更新:有一個額外的線性佈局被包含到這個視圖。我相信這可能是問題。有任何想法嗎?
沒有什麼錯在你的XML看不見的蒼蠅,你爲什麼說,不以任何設備工作,也許你可以張貼的內容的logcat引發錯誤... – Franco 2010-12-17 02:02:09
你能看看你的'res/layout-land/YOUR_FILE_NAME'中是否有'layout-land'文件,並且你對每個(縱向/橫向)模式有不同的佈局, – Samuel 2010-12-17 02:31:15