Floating action button's label
try something like this
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right">
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab_visitdetail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
android:src="@drawable/right_arrow"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Compose"
android:elevation="16dp"
android:textColor="@android:color/white"
android:textAppearance="?android:attr/textAppearanceMedium" />
</FrameLayout>
You can use like below code;
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<android.support.design.widget.FloatingActionButton
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:backgroundTint="#00fff0"
app:borderWidth="0dp"
android:elevation="0dp"
app:fabSize="normal" />
<TextView
android:layout_toRightOf="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"
android:text="Compose"/>
</RelativeLayout>
Try this
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:padding="@dimen/padding_4"
android:text="Add"
android:textColor="@android:color/black" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab_scan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginBottom="@dimen/margin_16"
android:layout_marginLeft="@dimen/margin_16"
android:layout_marginRight="@dimen/margin_16"
android:layout_marginTop="@dimen/margin_8"
android:src="@android:drawable/ic_input_add" />
</LinearLayout>