Very short: I have drawn 3 shapes with xml spanning the full width of the device:
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="horizontal" >
<ImageView
android:id="@+id/menu_ebook"
android:layout_width="0dp"
android:layout_height="100dp"
android:layout_weight="1"
android:background="@color/menuBlue"
android:clickable="true"
android:contentDescription="@string/menu_ebook"
android:soundEffectsEnabled="false" />
<ImageView
android:id="@+id/menu_library"
android:layout_width="0dp"
android:layout_height="100dp"
android:layout_marginLeft="1dp"
android:layout_marginRight="1dp"
android:layout_weight="1"
android:background="@color/menuBlue"
android:clickable="true"
android:contentDescription="@string/menu_ebook"
android:soundEffectsEnabled="false" />
<ImageView
android:id="@+id/menu_faq"
android:layout_width="0dp"
android:layout_height="100dp"
android:layout_weight="1"
android:background="@color/menuBlue"
android:clickable="true"
android:contentDescription="@string/menu_ebook"
android:soundEffectsEnabled="false" />
</LinearLayout>
These 3 shapes should always be a square on every device possible. Is this possible via xml, if not how to do this programmatically?
To clarify: The height of all 3 ImageViews should become equal to the width of 1 ImageView.
Thx in advance