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
30
votes
4 answers

How can I add a shadow to bottom sheet view?

As of now, with the official bottom sheet component from the Android design library implemented the top edge doesn't show a shadow. But for what I've seen in various mockups and in the Material Design specs, the bottom sheet include a discrete…
Chris
  • 514
  • 1
  • 5
  • 8
29
votes
2 answers

RecyclerView (wrap_content) inside of a BottomSheetDialogFragment

I'm facing a tricky situation here and I don't know how to solve this problem. In my project I have a custom BottomSheetDialogFragment and in the layout a FrameLayout to add or replace Fragments. Now I have a Fragment and inside I have a…
extmkv
  • 1,991
  • 1
  • 18
  • 36
28
votes
8 answers

Bottom Sheet Fragment comes up with keyboard

I have an edit text inside a bottom sheet fragment. when the focus come on the edit text the layout goes up . i tried android:windowSoftInputMode="adjustNothing" its work for the parent activity but not for the dialog fragment. This is my bottom…
DKV
  • 1,767
  • 3
  • 28
  • 49
27
votes
4 answers

BottomSheetBehaviour: The view is not associated with BottomSheetBehavior

I am using Google Design Support Library 25.0.0 In my activity I have a relative layout with app:layout_behavior="android.support.design.widget.BottomSheetBehavior" Now when I reference it for adding BottomSheetBehaviour, I get the …
27
votes
7 answers

Scroll not working for multiple RecyclerView in BottomSheet

I implemented BottomSheet using the DialogFragment approach. I have a TabLayout and ViewPager in the BottomSheet. The ViewPager is hosting 2 pages, each inflates a RecyclerView. The first(Coffee tab) RecyclerView scrolls fine. The problem I'm having…
You Qi
  • 8,353
  • 8
  • 50
  • 68
26
votes
6 answers

BottomSheet fly away with visibility change

I have a bottom sheet with a NestedScrollView inside (see below). When I press on a FAB button, I want to make some parts in this NestedScrollView invisible. But when I change some linearlayouts visibilities to GONE, bottomsheet fly aways from the…
Tanrikut
  • 418
  • 5
  • 11
25
votes
3 answers

BottomSheetBehavior Illegal state argument: 5

Could someone explain about when this exception occurs? 12-18 11:20:07.225 15944-15944/com.test.dev.debug E/AndroidRuntime: FATAL EXCEPTION: main Process: com.dev.debug, PID: 15944 java.lang.IllegalArgumentException: Illegal state argument: 5 at…
Anderson K
  • 5,445
  • 5
  • 35
  • 50
25
votes
5 answers

How to show SnackBar in BottomSheetDialogFragment?

I search alot but couldn't find any solution and Snackbar is not working within fragment class doesn't help. I pass rootView of fragment and also try passing a view from getActivity but none of them works! @Override public View…
25
votes
2 answers

RecyclerView (horizontal) nested in BottomSheet preventing vertical scrolling

I have a RecyclerView using a LinearLayoutManager with HORIZONTAL orientation, nested inside a FrameLayout using the BottomSheet Behavior. When attempting to drag vertically across the RecyclerView, the BottomSheet doesn't respond to the drag event.…
25
votes
9 answers

ListView in BottomSheet

I ran into a problem where I had a simple ListView in a BottomSheet and ListView had enough items to fill the screen and scroll even more. When I scroll down, everything seems to work however when I tried to scroll back up, it was scrolling the…
ᴛʜᴇᴘᴀᴛᴇʟ
  • 4,466
  • 5
  • 39
  • 73
25
votes
10 answers

Android ViewPager with RecyclerView works incorrectly inside BottomSheet

When I try to scroll list, sometimes this works incorrect - BottomSheet intercepts the scroll event and hides. How to reproduce this: Open Bottom Sheet Change a page of ViewPager Try scroll the list Result: BottomSheet will be hidden. Here is…
Vitaly
  • 549
  • 1
  • 6
  • 14
25
votes
3 answers

BottomSheetBehaviour setstate without animation

I have tried the new BottomSheetBehaviour with design library 23.0.2 but i think it too limited. When I change state with setState() method, the bottomsheet use ad animation to move to the new state. How can I change state immediately, without…
24
votes
3 answers

BottomSheetDialog background blinking

BottomSheetDialog's background is blinking when switching between apps. What am I doing wrong ? MainActivity.java public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { …
holtaf
  • 787
  • 6
  • 19
24
votes
1 answer

Android Bottom Sheet smooth expanding, like Google Maps

I want to recreate Bottom Sheet Behavior provided in the Google Maps app: Link to expected behavior. I have tried using BottomSheetBehavior and couple of other 3rd party libs like umano AndroidSlidingUpPanel but the problem I was unable to avoid…
superhrvoje
  • 241
  • 2
  • 5
23
votes
6 answers

Scrolling is not working with CoordinatorLayout + parallax image + BottomSheetLayout

Introduction I have an activity, which implements a common pattern with parallax header image and scrolling content using CoordinatorLayout, AppBarLayout and CollapsingToolbarLayout. My xml layout looks like…
1 2
3
81 82