I found a bug when using ViewPager2 (horizontal orientation), which the fragment contains a RecyclerView with GridLayoutManager (vertical orientation),
The RecyclerView with GridLayoutManager always jump-scrolls to top (1st item) when I scroll it vertically,
this issue does not exist when I change it to LinearLayoutManager
I suspect that this has something to do with bubbling onTouch event from nested recycler view, (AFAIK viewpager2 use RecyclerView)
Need help
Update: after doing research, it is may be caused by SwipeRefreshLayout wrapping my RecycleView, seems I need to extend it to something like "NestedScroll Swipe Refresh Layout"
Related
I have a RecyclerView located at the bottom of the inside of a vertical ScrollView. Now each RecyclerView item has an OnClickListener which "expands" the item's layout so that more details are shown. Now i noticed that when i have multiple item layouts expanded and i try to scroll up and down, logically the scroll is happening inside of the RecyclerView first thus :
Scrolling at a lower speed than it would be if it was scrolling outside of the RecyclerView and inside of the ScrollView
When you scroll upwards , the scrolling comes at a stop as you reach the top of the RecyclerView and then you need to scroll again to scroll through the rest of the ScrollView layout.
Furthermore, since the bottom part of the whole layout is occupied by the RecyclerView, in order to scroll upwards within the parent scrollview, you need to scroll to the top of the RecyclerView first, hit the top (where the indicator lights up) and then scroll upwards again.
Is there any way that i can use the outer ScrollView to scroll through the RecyclerView items and their expanded layouts? Can i scroll through the main layout when i'm scrolling from within the recyclerview?
A NestedScrollView should be used instead of ScrollView, that is if you want to stick with scroll views in general.
This approach is also explained here.
Or you can replace the entire scroll view with a large RecyclerView. It can be vanilla or with Epoxy.
I add a RecyclerView inside a NestedScrollView and recycler view has multiple Textinputlayout. Scrollview jumps when keyboard comes up and goes down. I have tried adjustPan and adjustResize in AndroidManifest and android:nestedScrollingEnabled="false" in xml but nothing works. Please help me to resolve this issue
Has anyone used a PlaceHolderView lib?
https://github.com/janishar/PlaceHolderView
has anyone ever come across the problem of putting a ListView or RecyclerView book inside the PlaceHolderView custom item?
need to insert a listview or recyclerview in the blank space in the image below
Exemple layout
I want to open a different row on scrolling RecyclerView vertically and hide previous row completely. Similar to ViewPager but vertically. I have tried the library VerticalViewPager, but it is just a vertical RecyclerView.
Please suggest me.
I'm using a tablayout with 3 fragments, each fragment has its own recyclerview. When trying to swipe from a fragment on a item the tablayout doesn't change tabs. I probably have to override a certain motionevent, but I don't know how.
I hope someone has the answer to this!
Thanks in advance.
It appears that when you are using a RelativeLayout in the layout that you are inflating the swiping part doesn't work. After changing this to a LinearLayout it solved the problem!