Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
In this article, we are going to learn how to use the BottomAppBar with Floating action button in Android.
Android’s bottom app bar component APIs provide support for the navigation icon, action items, overflow menu, and more for informing the user as to what each action performs. While optional, their use is strongly encouraged.
When using icons for navigation icons, action items, and other elements of bottom app bars, you should set a content description on them so that screen readers like TalkBack are able to announce their purpose or action, if any.
For an overall content description of the bottom app bar, set and android:contentDescription or use the setContentDescription method on the BottomAppBar.
For the navigation icon, this can be achieved via the app:navigationContentDescription attribute or setNavigationContentDescription method.
Bottom app bars provide access to a bottom navigation drawer and up to four actions, including the floating action button.
A BottomAppBar can be included in your screen layout like so :
BottomAppBar
A FloatingActionButton can be anchored to a BottomAppBar. We are using “layout_anchor” to attach the FAB to the BottomAppBar. You just have pass the id at which you want to anchor your FAB.
FloatingActionButton
In my case, I have chosen the default properties. “cradled” within a cutout. This is the default behavior.
CoordinatorLayout
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
Name
Email
Subject
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.