How to open Bottom Sheet in Android Kotlin

Sudish Kumar
Dec 18, 2020

Bottom Sheets are surface components that hold supplementary screen content. it looks likes as a dialog . we can show UI what ever we want we can also handle click events.

we need a fragment for showing Bottom Sheet .

like this,

class BottomSheetFragment :BottomSheetDialogFragment() {// setup add your xml in the fragment
}

You can use this code for open your Bottom Sheet

val bottomSheetFragment = BottomSheetFragment()
bottomSheetFragment.show(supportFragmentManager, "bottom sheet")

You can use multiple UI components (TextView, ImageView , Buttom,……) and also you can add lists and handle click events

you can see my Bottom Sheet project on GitLab

https://gitlab.com/sudishkumar/buttomsheet-app

Thank you Friends, Have a good day and night.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Sudish Kumar
Sudish Kumar

Written by Sudish Kumar

Flutter | Android | Node | Dart | Kotlin | Java | JavaScript | TypeScript | PHP | Short Story Teller | Tech Lead

No responses yet

Write a response