简体   繁体   中英

Change the shape of floating action button

I want to add a floating action button into my layout. would like to ask how to customized and change the shape of floating action button to your own icon?

If you want to change the "shape" then you'll probably have to create your own implementation of FAB with a custom shape, perhaps rectangular or square.

To change the icon, you just have to use the android:src attribute and point to the appropriate drawable. FAB is nothing more than an ImageView with super powers.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM