look at my picture I want to design layout like that. look at my XML code below, I already design it but when I rotate it to landscape, the button is not fit the shop area(short) and linear layout in image price area is out of boundary(longer). I want it fit all orientation.why I am using button? because when I pragmatically, I can use it as onClickListener
how can I design this layout for fit all orientation?
Have any way to design this layout using XML code (not use background image)
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@drawable/bar_all"
android:gravity="center_vertical"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<Button
android:id="@+id/btn_all"
android:layout_width="265dp"
android:layout_height="match_parent"
android:background="#00000000" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:orientation="vertical" >
<ImageButton
android:id="@+id/btn_ic_mypage"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="right"
android:layout_marginRight="12dp"
android:background="#00000000"
android:scaleType="fitXY"
android:src="@drawable/icon_mypage" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
- Linear Layout for place backgroud image
- Linear Layout for put button cover the shop area. easy coding onClickListener
- Linea Layout for cover $ image area and put the image area.