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
49
votes
2 answers

Why am I able to click "behind" the bottomsheet in Android?

I have a BottomSheet in my Activity. I'm calling behavior.setState(BottomSheetBehavior.STATE_EXPANDED); to show the bottom sheet and it works fine, but the problem I have is that I can somehow click on the empty space of my bottom sheet to trigger…
user1865027
  • 3,505
  • 6
  • 33
  • 71
46
votes
1 answer

How to create BottomSheetDialogFragment using Navigation Architecture Component?

I am using BottomSheetDialogFragment for displaying few custom setting's. Requirement: When i click on any tab in BottomSheetDialogFragment i replace the fragment and add it to backstack so that when user click's onBackPress or Up action it should…
45
votes
10 answers

android BottomSheet how to collapse when clicked outside?

I have implemented bottomsheet behavior with NestedScrollView. And was wondering if it is possible to hide the bottomsheet view when touched outside.
Pradeep Kumar Kushwaha
  • 2,231
  • 3
  • 23
  • 34
42
votes
1 answer

SurfaceFlinger: Failed to find layer FullScreenFragmentActivity in layer parent (no-parent)

I have a BottomSheetFragmentActivity which causes this crash on Android 8.0 devices. I am looking for a workaround, without setting targetSDK back to 26. I solved this as described here: But this in turn causes SurfaceFlinger: Failed to find layer…
Ralf Wickum
  • 2,850
  • 9
  • 55
  • 103
40
votes
6 answers

Custom smaller Detents in UISheetPresentationController?

Apple has finally released an Apple Maps-style "bottom sheet" control in iOS 15 in 2021: UISheetPresentationController. This type of sheet natively supports "detents", the heights at which a sheet naturally rests. The default large() detent…
pkamb
  • 33,281
  • 23
  • 160
  • 191
39
votes
18 answers

How to disable BottomSheetDialogFragment dragging

How to disable BottomSheetDialogFragment dragging by finger? I saw similar questions, but they're all about BottomSheet not BottomSheetDialogFragment.
39
votes
7 answers

Keyboard hides BottomSheetDialogFragment

There are more fields below the keyboard. This happened when i updated the support library. I know it's Kotlin but it looks almost the same as java. How do I fix this issue? This is what it looks like: My code: class…
38
votes
13 answers

BottomSheetDialogFragment - Allow scrolling child

I have a BottomSheetDialogFragment with a RecyclerView. The problem is, I want to disable the drag close function of the BottomSheetDialogFragment as long as the RecyclerView is not scrolled up (currently I can't scroll my RecyclerView as the…
prom85
  • 16,896
  • 17
  • 122
  • 242
37
votes
7 answers

Cannot access 'androidx.lifecycle.HasDefaultViewModelProviderFactory' which is a supertype of 'FavoriteBottomDialogFragment'. Check your module cla

I am getting error in the whole class that extends BottomSheetDialogFragment Cannot access 'androidx.lifecycle.HasDefaultViewModelProviderFactory' which is a supertype of 'FavoriteBottomDialogFragment'. Check your module classpath for missing or…
37
votes
5 answers

BottomNavigationView is not full width

I am working on an Android app and implementing BottomNavigationView from the design library. I have looked at many examples and I can't figure out what is wrong with my layout. The BottomNavigationView is not displayed as full width. Another issue…
midhunhk
  • 5,560
  • 7
  • 52
  • 83
34
votes
10 answers

Android BottomSheetDialogFragment does not expand completely

I have the following test bottom sheet implementation. When I set the peekHeight to a value less than 500, it works. After some value, any increase in peek height will not change how the bottom sheet is expanded. It Just remains there to only drag…
33
votes
3 answers

Flutter: Bottom sheet with TextField/TextFormField

In part of our application, I would like to have a simple form in BottomSheet like with the below code. unfortunately when i put into that, I get an error The following assertion was thrown during performLayout(): An InputDecorator, which is…
DolDurma
  • 15,753
  • 51
  • 198
  • 377
33
votes
8 answers

Android - Show BottomSheetDialogFragment above Keyboard

I'm trying to show a BottomSheetDialogFragment with a few EditText fields for the user to enter information. I want to show it directly above the keyboard, but it keeps covering up the contents. This is what happens when I bring up the…
advice
  • 5,778
  • 10
  • 33
  • 60
33
votes
2 answers

BottomSheetDialog/BottomSheetDialogFragment — which to use and how?

I'm working on a Material design app. One feature I want to implement is some kind of a poll. When a user clicks an element of a list, the persistent bottom sheet dialog, which looks like this should show up: Then, when user clicks any button, this…
32
votes
1 answer

Modal BottomSheetDialog with fullscreen ToolBar and Softkeyboard

How is it possible to create a modal BottomSheetDialog(Fragment) which switches to fullscreen with a ToolBar as shown in the Material Design Spec? I could add a ToolBar manually by adding a BottomSheetBehavior.BottomSheetCallback and setting the…
dipdipdip
  • 2,326
  • 1
  • 21
  • 31
1
2
3
81 82