Scroll through the contents of a RecyclerView using an outer ScrollView - android-recyclerview

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.

Related

Hiding Scrollview items when there isn't enough room to show them

I'm currently developing an app where a list of items are being rendered in a ScrollView that's positioned before and after a View just like shown in the image.
Now as I scroll the first and last items tend to get occluded by the padding/Views. Is there any way to handle this behavior by making any partially occluded item not make it to the view?

How to disable recycler view auto scrolling?

I'm currently working on a kotlin mobile application. The problem I have met is if there are having 3 reviews or above, the recycler view will auto generate a scroll bar on the right side and the display will become not so good. May I know that is there anyway to disable scroll bar of the recycler view so that my layout can view all the reviews by just add a scrollview on the layout?

Curved scrollbar in ScrollView on Android Wear 2.0

Is it possible to have a curved scrollbar like on WearableRecyclerView on ScrollView? How is it done?
Here is a reference to get you started.
To create a curved layout for scrollable items in your wearable app:
Use WearableRecyclerView as your main container in the relevant XML layout.
Set the setEdgeItemsCenteringEnabled(boolean) method to true. This will align the first and last items on the list vertically
centered on the screen.
Use the WearableRecyclerView.setLayoutManager() method to set layout of the items on the screen.
If you explore the document, you will be able to get in touch with the code snippet for customization of the scrolling.
For Circular Scrolling Gesture:
By default, circular scrolling is disabled in the
WearableRecyclerView. If you want to enable a circular
scrolling gesture in your child view, use the WearableRecyclerView’s
setCircularScrollingGestureEnabled() method.

ReactNative ScrollView scroll threshold

I am trying to understand how can I set a threshold for the RN ScrollView.
This is because if you have multiple vertical scrollable View in a horizontal ScrollView then the scrolling of the Views is very difficult.
So i just need something that holds the horizontal scrolling until the finger swipe horizontally for a certain pixel-span.
Has anyone a clue about how to archive this?
You can use the native scroll event in onScrollEnd to get the velocity of the scroll, then only scroll horizontally if it's past a certain amount. On most vertical/horizontal scrolls, most users only scroll in one direction. If you truly want to implement a distance based scroll, you would need to attach a PanResponder to your component and compare the distnaces of the Grant and Release events.

RecyclerView with page scrolling (Vertical ViewPager)

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.