0

The following code creates a blank floating action button (FAB):

 <android.support.design.widget.FloatingActionButton
    android:id="@+id/fab"
    android:c
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom|end"
    android:layout_margin="@dimen/fab_margin"
    app:fabSize="auto"
    app:tint="@color/white" />

FAB in a sample app

I know you can add an overlay image with

android:src="@drawable/ic_add" 

or something similar, but is it possible to use text directly?

Menasheh
  • 3,560
  • 3
  • 33
  • 48

1 Answers1

0

The FloatingActionButton extends ImageButton, which does not support text.

Francesco Taioli
  • 2,687
  • 1
  • 19
  • 34