jmo
jmo

Reputation: 357

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.

Upvotes: 1

Views: 367

Answers (2)

ianhanniballake
ianhanniballake

Reputation: 200080

You should instead use FloatingActionButton, part of the official Android Design Support Library.

Upvotes: 0

Related Questions