Android: How do I get text to label my Floating Action Button from the XML file? -


this question has answer here:

the following code creates 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 sample app

i know can add overlay image

android:src="@drawable/ic_add"  

or similar, possible use text directly?

the floatingactionbutton extends imagebutton, not support text.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -