Here is the GIF:
Code:
<?xml version="1.0" encoding="utf-8"?>
<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"
app:subtitleTextColor="@color/colorAccent"
app:titleTextColor="@color/colorPrimary"
tools:context="com.sawant.pritish.venetianhonda.MainActivity">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:scaleType="fitXY"
android:src="@drawable/mainimage2" />
<LinearLayout
android:id="@+id/linearoffloatingandtextview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<android.support.design.widget.FloatingActionButton
android:id="@+id/floatingActionButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginLeft="@dimen/floatingactionbuttonmargin"
android:layout_marginTop="@dimen/floatingactionbuttonmargin"
android:src="@mipmap/newfloating"
app:backgroundTint="#ff0000" />
<TextView
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_marginLeft="-18dp"
android:layout_marginTop="15dp"
android:background="@drawable/roundedcorner"
android:text=" MENU "
android:textColor="@android:color/white"
android:textSize="22sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/menulist"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/linearoffloatingandtextview"
android:layout_marginLeft="30dp"
android:layout_marginTop="@dimen/floatingactionbuttonmargin"
android:orientation="vertical"
android:visibility="gone"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/salesimageview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/sales" />
<TextView
android:id="@+id/salestextview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="10sp"
android:background="@drawable/roundedcornerwhite"
android:text="Sales"
android:textSize="15sp" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10sp"
android:orientation="horizontal">
<ImageView
android:id="@+id/serviceimageview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/service" />
<TextView
android:id="@+id/servicetextview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="10sp"
android:background="@drawable/roundedcornerwhite"
android:text="Service"
android:textSize="15sp" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10sp"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/specialoffers" />
<TextView
android:id="@+id/specialoffers"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="10sp"
android:background="@drawable/roundedcornerwhite"
android:text="Special Offers"
android:textSize="15sp" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10sp"
android:orientation="horizontal">
<ImageView
android:id="@+id/contactusimageview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/contactus" />
<TextView
android:id="@+id/contactustextview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="10sp"
android:background="@drawable/roundedcornerwhite"
android:text="Contact Us"
android:textSize="15sp" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10sp"
android:orientation="horizontal">
<ImageView
android:id="@+id/aboutusimageview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/aboutus" />
<TextView
android:id="@+id/aboutustextview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="10sp"
android:background="@drawable/roundedcornerwhite"
android:text="About Us"
android:textSize="15sp" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10sp"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/directionsimageview"
android:src="@mipmap/getdirection" />
<TextView
android:id="@+id/directionstextview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="10sp"
android:background="@drawable/roundedcornerwhite"
android:text="Get Direction"
android:textSize="15sp" />
</LinearLayout>
</LinearLayout>
<include layout="@layout/samebottomlayout"/>
</RelativeLayout>
I have created the sales,sevice,about us,contact us ,get direction buttons in separate LinearLayouts which are child of a parent LinearLayout.On click of floating button i am able to hide and show the buttons but not able to figure out the animation.What kind of animation i need to apply.Do i need to use a separate background thread and apply animation when floating button is clicked.Please help