Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
367 views
in Technique[技术] by (71.8m points)

java - Android Floating Action Button API 19 (KitKat)

I need to implement a floating action button, according to Google Design Guidelines, on my android application with API level 19.

However, I would know if some native support library (like v4, v7, v13) to help me build this component without the need for external dependencies.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I would know if some native support library (like v4, v7, v13) to help me build this component without the need for external dependencies.

No there aren't any support library floating action buttons (FAB). IMHO, it's a horrible decision to not include all of the material related widgets in the support library. In this video Chet Haase and Adam Powell basically say that the FAB is very easy to reproduce so they're not going to include it in any support library. So instead of Google creating one set of the material widgets to be used by millions of developers they would rather millions of developers create millions of different implementation of these widgets. </rant>

You can just make your own FAB by extending the View class. Here is an example from Github of a FAB that does not use any outside libraries.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...