8

I am trying to create a FAB button that has a circle icon in it. I want to fill the entire button with the icon as shown in the image, but Android seems always to add space between icon and button.
Can someone please explain how to get rid of the space? I have multiple FAB buttons in my app, and I only want to do this with one of them. How can I do this by setting the attributes of the button or programmatically?

D. Wang
  • 165
  • 1
  • 9
  • Adding 56dp in dimes.xml will do, but it changes all the FAB buttons in app. How do I make such a change only to one FAB button? – D. Wang Apr 03 '17 at 14:25
  • Check this out: http://stackoverflow.com/questions/27484126/adjust-icon-size-of-floating-action-button-fab. you can use the `scaleType` attributue to adjust it. – Kyle Emmanuel Apr 05 '17 at 14:29
  • Kyle, thank you for your reply. I tried to set scaleType with different values, but nothing changes. As I mentioned ealier, Adding 56dp in dimes.xml does change the size of icon in my FAB button, but it changes the look of all FAB button in my app. Any other suggestions? – D. Wang Apr 05 '17 at 15:05
  • @D.Wang, please let me know any hint or solution, if you got as I am also facing the similar issue. – Vikesh Prasad Aug 22 '17 at 05:28

0 Answers0