Is there a way I can Achieve the floating button to work on 4.0 and later android??
I\'ve seen it on google plus but I haven\'t found any tutorial. Only for android
Try this library, https://github.com/navasmdc/MaterialDesignLibrary
It can be easily to adapt to your project using Android Studio
You can use this demo FloatingView. This demo work from API 11.
Here put all the parts necessary to implement by code. FloatingView by steps
You can now use the FloatingActionButton from the support-design library. Add this dependency to your gradle build file:
compile 'com.android.support:design:22.2.0'
And then add the FloatingActionButton to your layout file:
<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:layout_margin="@dimen/fab_margin"
android:src="@drawable/ic_done" />
Example project from Chris Banes: https://github.com/chrisbanes/cheesesquare.
Here is one aditional free Floating Action Button library for Android It has many customizations and requires SDK version 9 and higher
Full Demo Video
dependencies {
compile 'com.scalified:fab:1.1.2'
}
Original post is here.
You can use this library, it works well from the Android 2.1, API level 7.
It's so easy to include it in your project:
build.gradle
dependencies {
compile 'com.shamanland:fab:0.0.6'
}
layout.xml
<com.shamanland.fab.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/your_image"
/>
I created an open-source library called FloatingActionButton. It's a Google+ like floating action button which reacts on the list view scrolling events. Becomes visible when the list view is scrolled up and invisible when scrolled down. API level 14+.