0
왜 LinearLayout의 화면 크기를 변경하지 않습니까?안드로이드 사용자 인터페이스 디자인
왜 LinearLayout의 화면 크기를 변경하지 않습니까?안드로이드 사용자 인터페이스 디자인
사용 방법에 따라 다릅니다.
레이아웃을 자동으로 크기 조정하려는 경우 LinearLayout
을 구성하는보기에 weight 매개 변수를 지정할 수 있습니다. 예를 들어
:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="1"
android:orientation="horizontal"
>
<SomeView
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="0.5"
/>
<SomeView
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="0.5"
/>
</LinearLayout>
당신이 파단 전체 수평 공간을 공유합니다이 경우 그 중 각각의 하나는 공간의 50 %를 취할 것입니다.