2012-04-27 72 views
0

我想在此表中設置滾動視圖。我該怎麼做?ScrollView在tablelayout裏面?

<TableLayout 
    android:id="@+id/lunchtableviewing" 
    android:layout_width="194dp" 
    android:layout_column="0" 
    android:layout_columnSpan="4" 
    android:layout_row="7" > 
</TableLayout> 

回答

1

據我所知,TableLayout內滾動型儘可能:

<ScrollView 
android:layout_width="match_parent" 
android:layout_height="wrap_content"> 
<LinearLayout 
android:layout_width="match_parent" 
android:layout_height="wrap_content"> 
<TableLayout 
    android:id="@+id/lunchtableviewing" 
    android:layout_width="194dp" 
    android:layout_column="0" 
    android:layout_columnSpan="4" 
    android:layout_row="7" > 
</TableLayout> 
</LinearLayout> 
</ScrollView> 
1

這是怎麼

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent"> 

<TableLayout 
android:id="@+id/lunchtableviewing" 
android:layout_width="194dp" 
android:layout_column="0" 
android:layout_columnSpan="4" 
android:layout_row="7" > 
</TableLayout> 
</ScrollView> 
相關問題