I have one RecyclerView inside Bottom Sheet and I don't want recyclerview to be scrollable inside it. But here I am facing a problem that Bottom Sheet expand and Collapse swipe property interfere with Recyclerview scroll and nothing is happening when I swipe. Please help me to solve this issue.
Related
I have a MotionLayout which basically contains an image and a ViewPager. The ViewPager renders a fragment with a RecyclerView in it.
At first the image has normal size, when i drag up, the image reduces its size and the ViewPager (with the RecyclerView within it) expands.
The problem is that the MotionLayout keeps intercepting the scroll action, so if the RecyclerView is expanded, and the user scrolls down, the MotionLayout will expand the image, rather than letting the RecyclerView scroll.
What i would expect is that the MotionLayout will expand the top image only if the RecyclerView has reached the first element, in that case since the RecyclerView cannot scroll anymore, the scroll action would be managed by the MotionLayout.
I am aware that within MotionLayout I can set the attribute moveWhenScrollAtTop="true" to get that behaviour, but that only works if there is just a RecyclerView, but not if the RecyclerView is within a ViewPager.
Has anyone faced this issue?
if your xml file contains nested scrollview just add android:nestedScrollingEnabled="false"
I have a Recyclerview with a Cardview and inside there is another Recyclerview like Netflix. So I cann scroll vertical and horizontal. Insider the inner recyclerview there are some cardviews with buttons. My Problem is if I scroll down and up again, then there apears some Space inside the Carview.
How does this happen?
Start
After Scrolling
Any suggestion or idea is helpful.
Note: Without the Itemdecoration (Page Indikator) it works and no Space appears.
I have a BottomSheet with some non-clickable content. This BottomSheet is sliding over a RecyclerView.
Problem is when I tap on the BottomSheet, the RecyclerView item behind it fires (which of course shouldn't happen). The list also scrolls when scrolling on the BottomSheet.
I've tried to set android:clickable=false on the container of the BottomSheet with no effect.
Is there an obvious trick for preventing that?
You need to set android:clickable=true on the container of the BottomSheet instead of android:clickable=false.
How to properly scroll to a position in nestedscrollview which is inside a coordinate layout? When I use scrollTo(), it seems like the view inside AppBarLayout is loosing the ability to scroll down when I scroll to the end of NestedScrollView and coming back to top. What I need to know is how to programtically scroll to a position in nestedscrollview without causing problem with the normal behavior of collapsing layout.
Issue is similar to what is mentioned in this post:
The Coordinator layout doesn't Scroll up for a specific position
There is a Gif attached along with the above question:
https://i.stack.imgur.com/uSGfX.gif
I have tried the solution in above link, but it is not working.
I made collapsible toolbar on Activity, but there is one problem.
Screen contains RecyclerView that has multiple layout items, and one of them is another RecyclerView that has horizontal scroll. When main recycler is scrolled, toolbar doesn't expand or collapse when scroll started on that nested recycler, but on other views it's working as it should.
To make it easier to understand: when I first touch screen on position where there is nested RecyclerView and try to scroll up and down, there is no collapsing or expanding of toolbar.
Any idea what might be causing that issue and how to fix it?
I only needed to set recyclerView.setNestedScrollingEnabled(false) for the nested RecyclerView to work.
Thanks to Reddit user in this thread:
Toolbar not collapsing with nested RecyclerView
For those who would like the same thing in Kotlin is:
recyclerView.isNestedScrollingEnabled = false
And for XML it is this property in RecyclerView but only for API 21 and higher:
android:nestedScrollingEnabled="false"