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
215
votes
28 answers

Round corner for BottomSheetDialogFragment

I have a custom BttomSheetDialogFragment and I want to have round corners in top of Bottom View This is my Custom class that inflates my layout that I want to appear from bottom View mView; @Override public View onCreateView(LayoutInflater…
124
votes
37 answers

Disabling User dragging on BottomSheet

I am trying to disable user dragging on BottomSheet. The reason I want to disable is two things. 1. It's preventing the ListView from scrolling downward, 2. I don't want users to dismiss using dragging but with a button on the BottomSheetView. This…
101
votes
5 answers

BottomSheetBehavior not in androidX libraries

I was using the BottomSheetBehavior with the original support library: implementation 'com.android.support:design:27.1.1' When I migrated to use the new androidx libraries though the BottomSheetBehavior is missing. The mapping from the above…
Jim Leask
  • 6,159
  • 5
  • 21
  • 31
100
votes
18 answers

How do you adjust the height and borderRadius of a BottomSheet in Flutter?

I'm probably missing something obvious here, but my BottomSheet only takes up the bottom half the screen, even though the widgets in it take up more space. So now there is scrolling behavior inside the BottomSheet. I'd like to be able to increase…
Mary
  • 18,347
  • 23
  • 59
  • 76
95
votes
18 answers

Show entire bottom sheet with EditText above Keyboard

I'm implementing a UI where a bottom sheet will appear above the keyboard with an EditText for the user to enter a value. The problem is the View is being partially overlapped by the keyboard, covering up the bottom of the bottom sheet. Here is the…
advice
  • 5,778
  • 10
  • 33
  • 60
85
votes
7 answers

BottomSheetDialogFragment - How to set expanded height (or min top offset)

I create a BottomSheetDialogFragment and I want to adjust it's maximum expanded height. How can I do that? I can retrieve the BottomSheetBehaviour but all I can find is a setter for the peek height but nothing for the expanded height. public class…
prom85
  • 16,896
  • 17
  • 122
  • 242
71
votes
14 answers

Prevent BottomSheetDialogFragment covering navigation bar

I'm using really naive code to show a bottom sheet dialog fragment: class LogoutBottomSheetFragment : BottomSheetDialogFragment() { override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View?…
oferiko
  • 1,927
  • 2
  • 16
  • 17
70
votes
6 answers

Scrollview not scrolling in Android bottomsheet

I tried the new BottomSheet in Android support. Inside the BottomSheet I have put a TextView and a ScrollView. The BottomSheetshowing just fine, the only problem I found is that the ScrollView in the BottomSheet is not scrolling. Every time I try to…
asiansaga
  • 743
  • 1
  • 5
  • 8
66
votes
13 answers

Prevent dismissal of BottomSheetDialogFragment on touch outside

I have implemented a BottomSheet Dialog and I want to prevent the bottomsheet from dismissing when the user touches outside of the bottomsheet when it's peeking (Not fully expanded state). I have set dialog.setCanceledOnTouchOutside(false); in the…
RamithDR
  • 2,103
  • 2
  • 25
  • 34
65
votes
16 answers

bottomSheetDialogFragment full screen

What I'm trying to achieve is something like Instagram in-app web browser, used when you click an ad: what I did, is I used a WebView bottomSheetDialogFragment, and I override onCreateDialog to get the full screen like this : @Override public…
64
votes
9 answers

BottomSheetDialogFragment - listen to dismissed by user event

How can I listen to a FINAL dismissal of a BottomSheetDialogFragment? I want to save user changes on the final dismissal only... I tried following: Method 1 This only fires, if the dialog is dismissed by swiping it down (not on back press or on…
prom85
  • 16,896
  • 17
  • 122
  • 242
63
votes
4 answers

Show and Hide Bottom Sheet Programmatically

I have implemented Bottom Sheet functionality within my activity in onCreate() using this solution and this library sheet = new BottomSheet.Builder(this, R.style.BottomSheet_Dialog) .title("New") .grid() // <-- important part …
Sophie
  • 2,594
  • 10
  • 41
  • 75
58
votes
7 answers

animateLayoutChanges="true" in BottomSheetView showing unexpected behaviour

I have a BottomSheetView which has animateLayoutChanges="true". Initially it shows up fine. But if change the visibility of a view (inside BottomSheetView) from GONE to VISIBLE, the app messes up calculations and my BottomSheetView moves to the top…
56
votes
6 answers

How can I dim the background when Bottomsheet is displayed, without using Dialog?

I know BottomSheetDialog does so already, but I need to use the regular BottomSheet and behavior generated from BottomSheetBehavior.from(). This BottomSheet doesn't dim the background and also touch outside would not close it. Is there a way to dim…
user1865027
  • 3,505
  • 6
  • 33
  • 71
55
votes
2 answers

Sliding up image with Official Support Library 23.x.+ bottomSheet like google maps

Update I want to accomplish the same behavior that google maps have with Support Library 23.x.+ and without ANY 3rd library NOTE: this is not a duplicated question because: I want to use Behaviors, Support Library and without ANY 3rd party library…
MiguelHincapieC
  • 5,445
  • 7
  • 41
  • 72
1
2 3
81 82