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 l preview. What did google+ use to achieve it?
Sorry, But unfortunately iOS doesn't support such kind of development. You can add the Floating button inside the app but you can't add that over other apps.
If you want to set icon size to particular Floating Action Button just go with Floating action button attributes like app:fabSize="normal" and android:scaleType="center".
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.
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