I have a linear vertical layout in the parent. Then the horizontal linear layout at the bottom, including 3 buttons
I want the 1st button on the left side of the activity at the bottom, the 2nd button in the center and the third button on the right side
Here is the xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <ImageView android:id="@+id/viewImageView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:contentDescription="@null" android:src="@drawable/ic_launcher" /> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom" > <Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button" /> <Button android:id="@+id/button2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button" /> <Button android:id="@+id/button3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right" android:layout_gravity="fill_vertical" android:text="Button" /> </LinearLayout>
android alignment button android-linearlayout
WISHY
source share