I want to create a submenu after click in my floating action button like this :
I already know this Library :
https://github.com/futuresimple/android-floating-action-button
But I want to create this with the native FAB of android support design :
compile 'com.android.support:design:23.+'
and
<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_add" />
Add the floating action button to your layoutThe size of the FAB, using the app:fabSize attribute or the setSize() method. The ripple color of the FAB, using the app:rippleColor attribute or the setRippleColor() method. The FAB icon, using the android:src attribute or the setImageDrawable() method.
The FloatingActionButton is accessible by screen readers and provides WAI-ARIA, Section 508, WCAG 2.1, and keyboard support. The Accessibility is part of Kendo UI for jQuery, a professional grade UI library with 110+ components for building modern and feature-rich applications.
To change the shape of the Floating action button: You can use the shape property of FloatingActionButton() widget class. Implement BeveledRectangleBorder( ) on this property. The output will be a square floating action button, increase the border-radius value to make a circular type shape.
It is not possible directly. android.support.design.widget.FloatingActionButton
is a subclass of ImageView
and it can't host children. You have to implement your own ViewGroup (a Vertical LinearLayout
should be enough) and put the FloatingActionButton
into it
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