简体   繁体   中英

Android Floating Action Button Opens Small View

In the Android App of Inbox by Google, when you press the FAB (Floating Action Button), a smaller view with options pop up. How would i go about implementing this?

带有子菜单的浮动操作按钮

[Picture taken on the web version for ease, but the effect and look is the same on the app.]

Floating Action Button for Android based on Material Design specification

https://github.com/futuresimple/android-floating-action-button

What you are looking for is called the Floating Action Button with Promoted Action for Android (Material Design). Based on Jerzy Chalupski (futuresimple) project linked above, The following github project provides exactly what you are looking for and more:

https://github.com/Clans/FloatingActionButton

有很多方法可以做到这一点,但是由于每个按钮都有不同的形式,我建议您创建一个仅显示按钮的自定义视图,当有人点击它时,会显示另一个视图(该表单),您很容易只需扩展一个像RelativeLayout这样的视图组

Its a long process, i have followed this tutorial for implementing the same - Floating Action Button

Hope this helps you.

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