2013-04-30 3 views
0

(RelativeLayout에) 두 테이블의 가로가 같도록 두 테이블을 나란히 표시 할 수 있습니까? 나는 그걸하는 법을 모른다. 이미 두 테이블 모두에 android:stretchColumns="*"을 설정해 보았습니다.하지만 한 테이블을 100 % 너비로 늘리면 두 번째 테이블이 화면 밖으로 밀려납니다.나란히 두 개의 TableLayouts

답변

3

당신은 아마 할 수있는 LinearLayout 0.5

<LinearLayout 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:orientation="horizontal" > 
    <TableLayout 
     android:layout_width="0dp" 
     android:layout_height="wrap_content" 
     android:layout_weight="0.5" /> 
    <TableLayout 
     android:layout_width="0dp" 
     android:layout_height="wrap_content" 
     android:layout_weight="0.5" /> 
</LinearLayout> 
TableLayout 무게 설정과
관련 문제