Вопрос в следующем, хочу сделать при ландшафтной ориентации экрана меню слева из пяти пунктов, стандартными методами плохо выходит с масштабирование и решил сделать следующим образом. Вертикальный LinearLayout разбить на пять одинаковых LinearLayout или RelativeLayout и в каждую ячейку поместить по прямоугольнику занимающему объем всей ячейки и разделенному на две половины, нижняя половина с текстом и фиксированной высотой, верхняя половина содержит картинку заполняющую весь объем. Так же в нижней и верхней части будет background или чучше его сделать в LinearLayout или RelativeLayout там где будут находиться прямоугольники, картинки с прозрачным фоном. Как лучше это реализовать?
Может через Bitmap или отдельным XML файлом и вставлять через merge.... Подскажите, пожалуйста, если можно с примером. Это все делается, для того, что бы при различных разрешениях нормально масштабировалась картинка и ничего не куда не залазило. Можно, что бы картинка просто была по центру в своей ячейке

Вот мой код, который я изменяю <LinearLayout android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="fill_parent" android:background="@drawable/bg_button2">
Код: Выделить всё
<TextView android:layout_width="fill_parent"
android:layout_height="33dp"
android:background="@drawable/bg_header"/>
<RelativeLayout android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="0.2">
<Button android:id="@+id/homeButton"
android:layout_width="55dp" android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_home_g"
android:background="@drawable/bg_button2"
android:textColor="#FFF"
android:textSize="10dp"
android:text="@string/str_base_activity_toolbar_home"/>
</RelativeLayout>
<RelativeLayout android:layout_width="55dp" android:layout_height="fill_parent" android:layout_weight="0.2">
<Button android:id="@+id/assignedButton"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_trailer_inspection_g"
android:background="@drawable/bg_button2"
style="@style/buttonFont"
android:text="@string/str_base_activity_toolbar_assigned"/>
<TextView android:id="@+id/assignedButtonCounter" android:layout_alignTop="@id/assignedButton" android:layout_alignRight="@id/assignedButton"
android:text="2" android:visibility="gone"
style="@style/buttonBadge"/>
</RelativeLayout>
<RelativeLayout android:layout_width="55dp" android:layout_height="fill_parent" android:layout_weight="0.2">
<Button android:id="@+id/availableButton"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_available_g"
android:background="@drawable/bg_button2"
style="@style/buttonFont"
android:text="@string/str_base_activity_toolbar_available"/>
<TextView android:id="@+id/availableButtonCounter" android:layout_alignTop="@id/availableButton" android:layout_alignRight="@id/availableButton"
android:text="2234" android:visibility="gone"
style="@style/buttonBadge"/>
</RelativeLayout>
<RelativeLayout android:layout_width="55dp" android:layout_height="fill_parent" android:layout_weight="0.2">
<Button android:id="@+id/completedButton"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_completed_g"
android:background="@drawable/bg_button2"
style="@style/buttonFont"
android:text="@string/str_base_activity_toolbar_completed"/>
</RelativeLayout>
<RelativeLayout android:layout_width="55dp" android:layout_height="fill_parent" android:layout_weight="0.2">
<Button android:id="@+id/mailButton"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_mail_g"
android:background="@drawable/bg_button2"
style="@style/buttonFont"
android:text="@string/str_base_activity_toolbar_mail"/>
<TextView android:id="@+id/mailButtonCounter" android:layout_alignTop="@id/mailButton" android:layout_alignRight="@id/mailButton"
android:text="2" android:visibility="gone"
style="@style/buttonBadge"/>
</RelativeLayout>
</LinearLayout>
