简体   繁体   中英

Customizable floating button in Android

Android allows us to create a floating button

I have found many resources for that.

I want to customize that button, and by that i mean to change the size of it I want it to be rectangle in dimensions of (20% of screen width and 15% of screen height)

is this something doable ? if so how?

Keep in mind that this is not the recommended way of Using FAB.See here: https://material.io/design/components/buttons-floating-action-button.html#

For changing the Shape of the Floating action button, I think you have to make your own implementation of FloatingActionButton ie a Custom FAB with Your own implementation of Custom Shape.

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