Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?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"
- tools:context=".MainActivity">
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentEnd="true"
- android:layout_alignParentStart="true"
- android:textAlignment="center"
- android:textSize="30sp"
- android:text="@string/title_text" />
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentEnd="true"
- android:layout_alignParentRight="true"
- android:layout_alignParentBottom="true"
- android:layout_margin="10dp"
- android:orientation="vertical"
- android:padding="10dp">
- <!--on below line we are creating a add fab-->
- <com.google.android.material.floatingactionbutton.FloatingActionButton
- android:id="@+id/idFABHome"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_margin="8dp"
- android:layout_marginBottom="16dp"
- android:background="@color/purple_200"
- android:contentDescription="@string/app_name"
- android:padding="4dp"
- android:src="@drawable/ic_home"
- android:visibility="gone"
- app:backgroundTint="@color/purple_200"
- app:tint="@color/white" />
- <com.google.android.material.floatingactionbutton.FloatingActionButton
- android:id="@+id/idFABContacts"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_margin="8dp"
- android:layout_marginBottom="16dp"
- android:background="@color/purple_200"
- android:contentDescription="@string/app_name"
- android:padding="4dp"
- android:src="@drawable/ic_phone"
- android:visibility="gone"
- app:backgroundTint="@color/purple_200"
- app:tint="@color/white" />
- <com.google.android.material.floatingactionbutton.FloatingActionButton
- android:id="@+id/idFABWriteContacts"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_margin="8dp"
- android:layout_marginBottom="16dp"
- android:background="@color/purple_200"
- android:contentDescription="@string/app_name"
- android:padding="4dp"
- android:src="@drawable/ic_add_contacts"
- android:visibility="gone"
- app:backgroundTint="@color/purple_200"
- app:tint="@color/white" />
- <!--on below line we are creating a settings fab
- and setting its visibility to gone-->
- <com.google.android.material.floatingactionbutton.FloatingActionButton
- android:id="@+id/idFABAdd"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_margin="8dp"
- android:layout_marginBottom="16dp"
- android:background="@color/purple_200"
- android:contentDescription="@string/app_name"
- android:padding="4dp"
- android:src="@drawable/ic_more"
- app:backgroundTint="@color/purple_200"
- app:tint="@color/white" />
- </LinearLayout>
- </RelativeLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement