0

다음 이미지에서 scrollable 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> 

답변

1

아니고 스크롤있는 tableView 또는 아무것도의 조각입니다. 그것의 간단한 GridView. this tutorial에 주어진대로 GridView를 채울 어댑터를 생성 할 수 있습니다.