Issue
I would like to replace the circle of the floating action button by a drawable, I'm using this fab fab on github I'm using this fab cause it work with SDK 14
It's the xml file :
<com.getbase.floatingactionbutton.FloatingActionsMenu
android:id="@+id/multiple_actions_saisiev2"
android:layout_width="179dp"
android:layout_height="368dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="false"
fab:fab_addButtonColorNormal="@color/dull_yellow"
fab:fab_addButtonColorPressed="@color/dull_yellow"
fab:fab_addButtonPlusIconColor="#182740"
android:layout_marginBottom="100dp"
android:layout_marginRight="30dp">
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_contre"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
fab:fab_colorNormal="@color/vert_fab"
fab:fab_title="@string/contre"
fab:fab_addButtonPlusIconColor="#FFFFFF"
fab:fab_colorPressed="@color/vert_fab"/>
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_perte"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
fab:fab_colorNormal="@color/vert_fab"
fab:fab_title="@string/perte"
fab:fab_addButtonPlusIconColor="#FFFFFF"
fab:fab_colorPressed="@color/vert_fab"/>
</com.getbase.floatingactionbutton.FloatingActionsMenu>
If I use android:background it's not working, and If I change the background in the JAVA, the png appears on the background of the button. I try to modifiy the library but nothing appears when I try to modify some thing.
Thanks
Solution
I guess this should help... the native use of Floating Action Button to set drawable attribute to it is like this.
android:src="@android:drawable/ic_dialog_email"
or from the library you are using, check the implementation
fab:fab_icon="@drawable/ic_fab_star"
Answered By - Pankaj Nimgade
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.