I have to code a layout
, where on the view overlaps on another view.
In the design when I click on bt1
Linearlayout
will we visible on exactly below the bt1
with small animation. I can design the animation and everything of the layout except on a thought how to put the LinearLayout
on bt3
and bt4
.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background">
<TableLayout
android:id="@+id/lv1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/custom_toolbar"
android:layout_marginTop="5dp"
android:orientation="horizontal">
<TableRow>
<Button
android:id="@+id/bt1"
android:layout_width="0dp"
android:layout_height="35dp"
android:layout_marginEnd="2.5dp"
android:layout_marginStart="3dp"
android:layout_weight="1"
android:background="@color/darkgrey"
android:fontFamily="@font/brandon_re"
android:text="button1"
android:textColor="@color/defaultWhite"
android:textSize="15dp" />
<Button
android:id="@+id/bt2"
android:layout_width="0dp"
android:layout_height="35dp"
android:layout_marginEnd="3dp"
android:layout_marginStart="2.5dp"
android:layout_weight="1"
android:background="@color/darkgrey"
android:fontFamily="@font/brandon_re"
android:text="button2"
android:textColor="@color/defaultWhite"
android:textSize="15dp" />
</TableRow>
</TableLayout>
<LinearLayout
android:id="@+id/lv2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/lv1"
android:layout_alignBottom="@+id/lv1">
<TextView
android:layout_width="match_parent"
android:layout_height="130dp"
/>
</LinearLayout>
<Button
android:id="@+id/bt3"
android:layout_width="match_parent"
android:layout_height="35dp"
android:layout_marginEnd="3dp"
android:layout_marginStart="2.5dp"
android:layout_weight="1"
android:background="@color/darkgrey"
android:fontFamily="@font/brandon_re"
android:layout_below="@+id/lv1"
android:layout_marginTop="20dp"
android:text="button3"
android:textColor="@color/defaultWhite"
android:textSize="15dp" />
<Button
android:id="@+id/bt4"
android:layout_width="match_parent"
android:layout_height="35dp"
android:layout_marginEnd="3dp"
android:layout_marginStart="2.5dp"
android:layout_weight="1"
android:background="@color/darkgrey"
android:fontFamily="@font/brandon_re"
android:layout_below="@+id/bt3"
android:layout_marginTop="20dp"
android:text="button4"
android:textColor="@color/defaultWhite"
android:textSize="15dp" />
</RelativeLayout>