Bottom Sheet Dialog in Andriod application .
Bottom Sheet Dialog box
: Bottom Sheet Dialog is a component that slides up from the bottom of
the screen. There are two types of bottom sheets Persistant Bottom Sheet and
Modal Bottom Sheet.
Persistant Bottom Sheet
:
This bottom sheet shows in-application content. It will be shown at the
base of the screen with a portion of its part noticeable , it shows full
substance in the wake of growing it.
Modal Bottom Sheet
: This bottom sheet functions as a menu or discourse with choices, it
implies this replaces menu or exchange. It has a higher height than the
determined base sheet. For the most part, they are utilized for
incorporating profound connecting picker activities.
Bottom Sheet Dialogs are very commonly used in a lot of applications
today.
Here we will be imitating a bottom sheet dialog like the Whatsapp App
that enables us to set the profile name of our profile.
Let’s get started…
After that we need to create a fragment that will be our bottom sheet
dialog fragment. In the bottom_sheet,xml file paste in the following
code.
Now to handle the functionality of the bottom sheet dialog box, paste the following code in BottomSheet.java file
And finally, in the MainActivity.java file add this code...
Output :
Comments
Post a Comment