Questions tagged [bottom-sheet]

Material design concept - bottom sheets slide up from the bottom of the screen to reveal more content.

There are two major types of bottom sheets:

  • Modal bottom sheets are alternatives to menus or simple dialogs. They can also present deep-linked content from other apps. They are primarily for mobile.
  • Persistent bottom sheets present in-app content. Elevation distinguishes modal from persistent bottom sheets. Modal bottom sheets rest at a higher elevation than the app’s content; whereas persistent bottom sheets rest at the same elevation as the app and integrate with its content.

On larger screens, where space is less constrained, using alternative surfaces and components such as simple dialogs and menus may be more appropriate than bottom sheets.

1221 questions
12
votes
2 answers

Full Screen Bottom Sheet with Close(X) button at the top

I am trying to implement a bottom sheet from the google design lib. Clicking on a button should open up bottom sheet which covers the whole activity window. Like when we open an email in Inbox by Gmail. But, it should open up from bottom and slide…
kirtan403
  • 7,293
  • 6
  • 54
  • 97
12
votes
2 answers

How to handle issues of the new bottom sheet of the support/design library?

Background I've used a modified version of bottom-sheet library (here, based on this library, also wrote about it here), in order to have a nice transition between collapsed (AKA "peeked") state and expanded state. The library had its issues, but in…
11
votes
2 answers

BottomSheetBehavior with ViewPager2 can't be scrolled down by nested RecyclerView scroll

I have a view that acts like BottomSheetBehavior and this view has ViewPager2 inside. Each ViewPager2's page is a vertical RecyclerView. The issue is that BottomSheet doesn't scroll down when current vertical RecyclerView (which is a page of…
SimpleAndroid
  • 281
  • 2
  • 8
11
votes
3 answers

OnBackPressedCallback not called in Bottom Sheet Dialog Fragment

I have a Bottom Sheet Dialog Fragment which contains four Fragment with ViewPager. I want to call a method when onBackPressed clicked in Bottom Sheet Dialog Fragment. Implemented OnBackPressedCallback in my OnCreateView but it is not triggered. Any…
ysfcyln
  • 2,857
  • 6
  • 34
  • 61
11
votes
0 answers

Share Viewmodel between BottomSheetDialogFragment with normal Fragment not working (observe function not trigger)

I want to share the same Viewmodel between my base fragment along with opened BottomSheetDialogFragment So this is how i observe to same viewmodel between these two fragment. BottomSheetDialogFragment public class TasteFilterBottomDialogFragment…
Varis Darasirikul
  • 3,907
  • 9
  • 40
  • 75
11
votes
1 answer

How to open BottomSheetDialogFragment fully expanded in Kotlin?

I am able to open my BottomSheetDialogFragment with val bottomSheet = BottomSheetFragment() bottomSheet.show(fragmentManager!!, "BottomSheet") but it only opens to show half of its content - I would like it to expand on opening to the full height…
SQLol
  • 227
  • 2
  • 4
  • 12
11
votes
1 answer

Add/Replace Fragment inside of BottomSheetDialogFragment

This this code : in which i open bottomSheetDialogFragment in that i want to add fragment. I want to add multiple fragments in bottomsheetDialogFragment but it throws java.lang.IllegalArgumentException: No view found for id 0x7f0a01cb class…
khushbu
  • 382
  • 1
  • 3
  • 15
11
votes
1 answer

Espresso test for bottomsheet

I am creating an espresso test for bottom sheet where the sheet has 5 linearly arranged textview and the first textview is visible and clicking the first textview will expand the entire bottom sheet revealing all the items, and then the third item…
Nikhil Soni
  • 1,011
  • 1
  • 11
  • 23
11
votes
2 answers

Collapsing Toolbar Layout is not expanded at first time and pin doesn't work

I have a bottom sheet in my app and I want to use of Collapsing Toolbar Layout in it. but when I open bottom sheet Collapsing Toolbar Layout will disappear and I have to scroll down to see it. And another problem is about pin mode that doesn't work…
Ehsan
  • 2,676
  • 6
  • 29
  • 56
11
votes
2 answers

Android BottomSheet adapt/shrink related map view

Trying to mimic the current google maps Bar at the bottom. I failed so hard and tried so much; CollapsingToolbar, BottomSheet, custom libs. What I want: Making the map view adapt it's size and camera when the BottomSheet is sliding, so that the…
11
votes
1 answer

Different behaviours with ADJUST_RESIZE in BottomSheetDialogFragment

I'm trying to create a BottomSheetDialogFragment with a TextInputLayout inside. I'm setting this BottomSheet as adjustResize to prevent the keyboard cover the TextInputLayout. The thing is that I'm getting different behaviours with different android…
Buntupana
  • 984
  • 1
  • 15
  • 33
11
votes
4 answers

RecyclerView inside the bottomsheet is not working

Following are my xmls MainView
andinrajesh
  • 575
  • 2
  • 9
  • 24
11
votes
1 answer

Android: Nested bottom sheet click/drag touch event issue

I have a bottom sheet nested inside another bottom sheet (FrameLayouts using the BottomSheet layout behavior) I also have a couple of 'peek views' (FrameLayouts) which have click listeners attached, to expand the bottom sheet(s) respectively, when…
11
votes
5 answers

Persistent BottomSheet below ActionBar

I have an app layout with a custom toolbar and a persistent BottomSheet - both inside of a CoordinatorLayout. On a button click I want to show the BottomSheet. Right now the sheet is displayed fullscreen and overlays the toolbar. By setting the app…
nor0x
  • 1,213
  • 1
  • 15
  • 41
11
votes
8 answers

Hidden state of the Bottom Sheet

I am trying to set hidden state for BottomSheet, but it doesn't work. What's the problem? bottomBar = BottomSheetBehavior.from(findViewById(R.id.bottom_bar)); bottomBar.setState(BottomSheetBehavior.STATE_HIDDEN);
John
  • 355
  • 2
  • 4
  • 15