我在TableLayout中有一個TableRow。如果我在TableRow中放置一個垂直的ScrollView,它會按預期工作。但是,如果我將一個HorizontalScrollView放在TableRow中,那麼滾動根本不起作用。TableRow中的HorizontalScrollView
有誰知道爲什麼會發生這種情況?我可以使用任何解決方法來實現嗎?
在此先感謝!
- 編輯 -
下面是一個例子:
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TableRow>
<HorizontalScrollView android:scrollbars="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TableLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<TableRow>
<Button android:layout_width="350px" android:layout_height="350px" android:text="TEST" />
<Button android:layout_width="350px" android:layout_height="350px" android:text="TEST" />
</TableRow>
<TableRow>
<Button android:layout_width="350px" android:layout_height="350px" android:text="TEST" />
<Button android:layout_width="350px" android:layout_height="350px" android:text="TEST" />
</TableRow>
</TableLayout>
</HorizontalScrollView>
</TableRow>
</TableLayout>
如果我改變HorizontalScrollView到垂直滾動型,它的工作原理(顯然垂直)。
發佈您的佈局xml和相關的Java。 – Krylez
你解決了這個問題嗎? –