Request: Add a BottomSheetDialog example with a RecyclerView inside
See original GitHub issueHi,
I’d be nice to have an example featuring a BottomSheetDialog
, which would have views at the top of the layout, a RecyclerView with more items than can fit in the screen, and views in the bottom as well.
This would be very helpful to not just me as I failed to find how to do it right on the public web (and failed to do it right on my own, having views behind the SystemUI).
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Android RecyclerView inside BottomSheetBehavior layout
Try this: mRecycler.setOnTouchListener(new RecyclerView.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { int action = event ...
Read more >Android - Display BottomSheet on RecyclerView Item Click ...
A sample video is given below to get an idea about what we are going to do in this article.
Read more >Implementing Bottom Sheet Dialogs using Android Studio
Here is an example of a Persistent Bottom Sheet dialog in a Google Maps application. Google Maps Bottom Sheet ...
Read more >Android Studio Tutorial | Bottom Sheet Dialog - YouTube
larntech #BottomSheet # BottomSheetDialog Android Bottom Sheet Dialog Fragment is what we are going to learn and implement in this tutorial.
Read more >Bottom sheet with a list and a pull to refresh action on Android
A tutorial on how to create a bottom sheet with a recycler view and a pull to refresh action on Android This is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@itsandreramon It depends on the behavior you are going for!
One comment for the above code is that
view?.applyInsetter
is acting on theFragment.getView()
, and not thecom.google.android.material.R.id.container
, even though the nesting seems to imply otherwise. You’d probably be better off applying those insets directly inonViewCreated
, rather than in theonAttachedToWindow
callback.If the content in your bottom sheet can be really big (large enough to fill up the entire screen), you might also see your content interact strangely with the status bar unless you also apply the status bar insets.
The latest
1.4.0-alpha
versions of the material components library also now have more built-in support for going edge-to-edge, including some fancy dynamic updating of the status bar color.Thank you very much, will fix this 😃