Creating a FAB/extended FAB
A FAB is a circular button that appears to float above the UI of an Android application. It is often used to represent a primary action in the app and is placed in a visible location for easy access.
An extended FAB is a variation of a FAB in Android that provides users with more options and functionality. The extended FAB is a rectangular button that can display text and an icon and expands into a menu of related actions when pressed.
Getting ready
In this recipe, we will continue using the same project, so ensure you have completed previous recipes.
How to do it…
Using the same project, follow these steps to build a FAB and extended FAB:
- Let’s start by creating a Kotlin file and calling it
ActionComponentsDemo.kt
. - Inside
ActionComponentsDemo
, create a composable function and call itActionComponentsExample()
:@Composable
fun RadioButtonExample() {...}
- Inside
ActionComponentsDemo
, create a composable function and...