How to make a Floating Action Button?

2

I'm developing an Android application, would you like to know or some example to include a Floating Action Button?

This Button Floating Action Button would be a shortcut to an action on the system, in my case it would call an activity. This button would behave similar to YouTube app , which contains this button / camera shortcut.

    
asked by anonymous 19.08.2016 / 18:57

1 answer

3

FloatingActionButton

There is a guide to using the library that explains how and when to use the floating button correctly in new or existing projects.

Usage example:

<android.support.design.widget.FloatingActionButton
        android:id="@+id/fab"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|end"
        android:layout_margin="@dimen/fab_margin"
        android:src="@android:drawable/ic_hoje_eh_sexta_feira" />

Dependency Libraries

build.gradle

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
}
  

Google launched a support tool during the   Google I / O 2015.

FloatingActionButton Animated

Checkthe Floating Action Button of Material Design of Google.

    
19.08.2016 / 20:00