2013-08-19 5 views
1

기존 코드에는 동일한 행에 수평으로 정렬되는 3 개의 버튼이 있지만이 버튼을 별도의 행에 표시하고 싶습니다.TableLayout의 행 사이 공간

기존 레이아웃 ...

[-------] ------- [-------]

레이아웃 전과 후 ...

[-------]
[-------]
[-------] 아래 하나 개의보기를 원한다면

<TableLayout 
    android:id="@+id/buttonTableLayout" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_weight="1" 
    android:stretchColumns="0,1,2" > 

    <TableRow 
     android:id="@+id/tableRow0" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:orientation="horizontal" > 
    </TableRow> 

    <TableRow 
     android:id="@+id/tableRow1" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:orientation="horizontal" > 
    </TableRow> 

    <TableRow 
     android:id="@+id/tableRow2" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:orientation="horizontal" > 
    </TableRow> 
</TableLayout> 

답변

1

다른, 레이아웃 코드는 잘되어야합니다! 보기로 채우려 고 했습니까? 한 행의 모든보기가 한 행에 표시되므로 별도의 행이 3 개인 경우 3 행이 필요합니다 (올바르게 수행 했음).