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
14
votes
1 answer

BottomSheet + ViewPager2 drag to hide not works

I got troubles and I think it is CoordinatorLayout's fault but not sure. I'm using ViewPager2 inside a ConstraintLayout and I use the CoordinatorLayout like BottomSheet. But when I drag to hide it not works good. I replaced the ViewPager2 by…
14
votes
8 answers

How to set max height in BottomSheetDialogFragment?

I have a BottomSheetDialogFragment and i need to set my height in this dialog. I need, that when user tap on a button, dialog will appear and fills 85% of screen. How to do this?
user11163395
14
votes
1 answer

How do I add animation to BottomSheetDialogFragment

I have a BottomSheetDialogFragment which has two buttons in it and when I click on any button dismiss() method is called. Is there a way by which I can animate BottomSheetDialogFragment. I want it to show a slow sliding down animation with a…
Vijay
  • 191
  • 1
  • 1
  • 9
14
votes
2 answers

BottomSheetBehavior is not work when design library update to 24.2.0

BottomSheetBehavior work properly in compile 'com.android.support:design:24.1.1' but when I update it to 24.2.0,it is not work.Is that a bug? This is my code:
Yin Shudi
  • 217
  • 3
  • 9
13
votes
2 answers

How to expand BottomSheetScaffold to a specific height at with Jetpack Compose?

Is there a way to expand the BottomSheetScaffold to a specific height? The content of my BottomSheetScaffold is a big list so it expands to fullscreen. I did not find a way to always expand to a specific height, regardless of the content.
Cyril
  • 580
  • 2
  • 11
  • 23
13
votes
5 answers

Standard Bottom Sheet in Flutter

I'm having very hard time to implement "Standard Bottom Sheet" in my application - with that I mean bottom sheet where "header" is visible and dragable (ref: https://material.io/design/components/sheets-bottom.html#standard-bottom-sheet). Even…
pb4now
  • 1,305
  • 4
  • 18
  • 45
13
votes
2 answers

How to change the default height of bottomsheet dialog fragment?

While using bottomsheet dialog fragment it set default height for bottomsheet dialog. In my application I want to set 80% height for bottomsheet dialog. How can I set 80% height to bottomsheet dialog?
user3176486
13
votes
3 answers

Android : Multi line text EditText inside BottomSheetDialog

I have a bottom sheet dialog and exists EditText in layout. EditText is multiline, max lines is 3. I put : commentET.setMovementMethod(new ScrollingMovementMethod()); commentET.setScroller(new…
SBotirov
  • 13,872
  • 7
  • 59
  • 81
13
votes
4 answers

Elevation not working for BottomSheet inside Coordinator layout

I am trying to use a BottomSheet in my layout. The root view is an CoordinatorLayout and I want to set Elevation on top for the Bottom Sheet so i am setting it with a high value (50dp), however it is not showing when the app runs but it appears on…
Atef Hares
  • 4,715
  • 3
  • 29
  • 61
13
votes
5 answers

How to set max width for BottomSheetDialogFragment

Question I'm using the BottomSheetDialogFragment for my modal bottom sheet and would like to set a maximum width so that on tablets/large screens the BottomSheet doesn't occupy the entire width of the screen. How do I approach solving this?…
ade.akinyede
  • 2,214
  • 1
  • 13
  • 17
13
votes
3 answers

How can I implement BottomSheetDialogFragment with fixed height

I need to implement BottomSheetDialogFragment and face with the problem. I need that my BottomSheetDialogFragment has fixed height. Does anyone has an idea how to do it? Here is my xml of fragment content
12
votes
5 answers

Permanent Persistent Bottom sheet flutter

I want my bottom sheet to stay on the screen till I close it from a code. Normally the bottom sheet can be closed by pressing back button(device or appbar) or even just by a downward gesture. How can I disable that? _scaffoldKey.currentState …
Ayush Singh
  • 1,409
  • 3
  • 19
  • 31
12
votes
2 answers

Pin a view to bottom of screen in BottomSheetDialog Fragment

I've used BottomSheetDialogFragment in my project and I've designed it as below: Target: I'm going to stick the bottom menu of BottomSheetDialog to bottom of the screen, in either mode collapse and expand. So in BottomSheetDialog layout, I used…
roghayeh hosseini
  • 676
  • 1
  • 8
  • 21
12
votes
3 answers

EditText setError is out of place in BottomSheetDialog

I am facing a problem with the position of the error indicator of my EditText when calling editText.setError("..."). As you can see in the screenshot I am using a BottomSheetDialog with an EditText inside of it. When I display the error indicator,…
Philipp Jahoda
  • 50,880
  • 24
  • 180
  • 187
12
votes
1 answer

react-native wrapper for CoordinatorLayout and BottomSheetBehavior

I've been writing a native android module that wraps a BottomSheetBehavior. A very simple BottomSheetBehavior can be implemented like this https://gist.github.com/cesardeazevedo/a4dc4ed12df33fe1877fc6cea42475ae The first thing that i faced, the…
FXCesinha
  • 393
  • 3
  • 16