简体   繁体   中英

Floating Action Button Without Checkable

I've been following this code example from Google about the Floating Action Button in the newest Android library http://developer.android.com/samples/FloatingActionButtonBasic/index.html

This works, as a Checkable button. However, I don't want it to be checkable, I just want to be able to click it and animate it as you'd expect (seems strange the Google example is for a checkable button when it seems like it'd be against their design principles, and others have had problems)

I'm reasonably new to Android, and so far my research has come up with a lot of external libraries, but I'm trying to keep it as native as possible

Is there an interface in Android Java that would allow me to essentially use this as a button? The FAB button example is Checkable and obviously the constructors and methods pertain to that.

您应该改用FloatingActionButton ,它是官方的Android设计支持库的一部分

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