안녕하세요 안드로이드펍 가족님들.
현재 갤럭시s4~s2 대응하기위해서 가중치를 이용하고있습니다.
어느해상도에 가도 저런식으로 출력될수 있도록 하기위해서
아래와같이 코딩하였습니다. 답은 잘됩니다.
하지만 먼가 너무 소스가 더러워지고 관리하기 힘든데요.
더 좋은방법 아시는분 있으신가요.. 현업에서는 어떻게 쓰는지 궁금 합니다.
좋은하루 되세요.
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.19"
android:orientation="vertical"
android:weightSum="1" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.17">
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.66"
android:weightSum="1">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.17">
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.58">
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bt_menu" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.25">
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.17">
</LinearLayout>
</LinearLayout>
