Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add button like "New Mail" button of Gmail app

I want to add a button like the "New Mail" button in the Gmail app (The circle button bottom of right with pen icon), which is floating on the screen. Can someone show me how to do this? is it possible to do this without the Material Design guidelines?

enter image description here

like image 724
Zai Nguyễn Avatar asked Jan 20 '15 04:01

Zai Nguyễn


2 Answers

This library: https://github.com/futuresimple/android-floating-action-button seems to do a decent job of replicating the Floating Action Button, as well as some of the menu interactions if you're interested in those.

like image 182
lopar Avatar answered Nov 01 '22 15:11

lopar


Or just import the official Google FAB sample in Android Studio:

File > Import Sample > search for FloatingActionButtonBasic.

The FloatingActionButton library is part of The Android Open Source Project

like image 39
Samara Avatar answered Nov 01 '22 15:11

Samara