0

Look at this video: https://ibb.co/37V0Vgt. I wanted to create a activity with the bottom view(in the video) which you drag up and down. The view also snaps in two positions.

  • when it is fully expanded
  • all the way down

I have been searching for a way to create this kind of view but have found nothing. The problem is if you have a view at the bottom how can you expand it up just like in the video.

What I want is a solution on how to implement this kind of view. You would add it to the bottom of your activity layout and behave exactly like in the video. Is this something which already exists? Then what is it called?

OscarCreator
  • 374
  • 4
  • 13

1 Answers1

0

This is a Botom Sheet. You can place a layout inside a CoordinaterLayout and apply the BottomSheetbehaviour to it to create this view.

app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"

You'll require the Material Components Library as stated here.

In your video, the Bottom Sheet is in the STATE_COLLAPSED state and can be pulled out.

Alexander Hoffmann
  • 5,104
  • 3
  • 17
  • 23