0
如何在下面的圖像中實現可滾動的tableLayout,問題是如何在表格中像這樣的順序插入視圖。Scrollable tableLayout
它是否需要適配器在tableLayout中插入視圖?如果是的話,它是如何工作的?
image of the scrollable TableLayout http://dl.dropbox.com/u/42106750/scrollview.jpg 這裏是XML UI
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/body_tile_bg"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="vertical" >
<TextView
android:id="@+id/textView1"
style="@style/InitSelectAppsParagraphHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="8dp"
android:text="@string/init_Select_apps_use_the_force" />
<TextView
android:id="@+id/textView2"
style="@style/InitSelectAppsParagraphBody"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:gravity="center_horizontal"
android:text="@string/init_Select_apps_paragraph" />
</LinearLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2"
android:padding="8dp" >
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</TableLayout>
</ScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="12dp"
android:background="@color/init_select_apps_grey_bg"
android:paddingBottom="4dp"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="4dp" >
<TextView
android:id="@+id/textView3"
style="@style/InitDarkBackgroundTextStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/choose" />
<TextView
android:id="@+id/textView4"
style="@style/InitSelectAppsGreenBigText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:text="4"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/textView5"
style="@style/InitDarkBackgroundTextStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/init_select_apps_more_to_continue" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="38dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="16dp"
android:background="@color/init_select_apps_grey_bg"
android:paddingLeft="8dp"
android:paddingRight="8dp" >
<TextView
android:id="@+id/textView6"
style="@style/InitDarkBackgroundTextStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="@string/init_select_apps_add_much" />
<Button
android:id="@+id/button1"
style="@style/InitNextButton"
android:layout_width="wrap_content"
android:layout_height="28dp"
android:layout_gravity="center_vertical"
android:layout_marginLeft="16dp"
android:text="@string/next" />
</LinearLayout>
</LinearLayout>