I want following layout in my app.
A button at top, second botton at bottom and third occupying the whole middle space. Following code I am using bt it is not showing the second button. How to achieve the result ?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/LinearLayout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical">
<!--view=2-->
<Button
android:id="@+id/button2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Save"
/>
<Button
android:id="@+id/button4"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="Previous"
/>
<Button
android:id="@+id/button5"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Next"
/>
</LinearLayout>
You can achieve it through Relative Layout
Here you go
Quoting OP’s Second Question
Here you go
It will give you following output