My question revolves around the Floating action button that was introduced in Android Material Design.
There are many library offering this component on GitHub as:
But my question is:
Is there a native component with the last release of android.support.vX
that was built for Floating action button
?
Components such as :
Today (29/05/2015) it is officially avaiable with the new Material Design support Library.
Just add this dependency to your build.gradle
compile 'com.android.support:design:22.2.0'
Add this view to your layout:
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:src="@drawable/ic_done" />
And use it:
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//TODO
}
});
Not yet, there have been hints that we will see it in the next support lib.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With