ksoichiro / Android-ObservableScrollView

Android library to observe scroll events on scrollable views.
http://ksoichiro.github.io/Android-ObservableScrollView/
Apache License 2.0
9.65k stars 2.06k forks source link

Viewpager with ObservableScrollView with Viewpager #274

Open YJArc opened 7 years ago

YJArc commented 7 years ago

I have a viewpager with fragments... one of the fragments has an observable scroll view with a viewpager and tabs. inside it i have a recyclerview. However when scrolling the recyclerview the scrollview is never pushed up along with it until you reach the top of my header... How can I make it so the observable scroll view intercepts the touch until I reach the top. from there the recyclerview can handle touch. I see there are a couple of examples with viewpagers here but I'm having difficulty understanding them and I need a viewpager with an observable scroll view with another viewpager.

edit: this has a parallax effect on the tablayout for the viewpager inside observablescrollview

YJArc commented 7 years ago

Using the FlexibleSpaceWithImageWithViewpagerTab2Activity sample code I was able to do as i requested (having Viewpager with Scroller with viewpager with recyclerview) However, the emulator crashes consistently after some scrolling. Will update if I find the cause

EDIT: After some searching, there are easier/cleaner/robust methods to do this using android desgin libs. particularly: http://blog.iamsuleiman.com/parallax-scrolling-tabs-design-support-library/