Vertical ScrollView inside a Vertical ViewPager - android

I have implemented Vertical ViewPager from this: Android: Vertical ViewPager
I have a fragments which contains ScrollView inside. What I want to do is to switch the pages only when the ScrollView inside has reached at the end. When ScrollView is at the end, further scrolling should switch the pages in ViewPager.

Related

How to implement vertical ViewPager with this animation?

I have two fragments and they should be inside vertical ViewPager with this animation: link
How to implement vertical ViewPager with such animation?

NestedScrollView inside ViewPager inside NestedScrollView: Innermost NestedScrollView not scrolling

So I have a Fragment which uses a CoordinatorLayout with a NestedScrollView inside. Inside that NestedScrollView is a ViewPager. Each item of that ViewPager is a CoordinatorLayout with a NestedScrollView inside.
The behavior I want is that when each item inside the ViewPager is scrolled up and down, my custom BottomBar will disappear and reappear.
When I scroll up and down, however, the BottomBar disappears and reappears, but the content in the innermost ScrollView does not move. This is the problem
Code posted below, any advice would be helpful.
Things I've tried:
Calling ViewCompat.setNestedScrollingEnabled() on nearly every view in the hierarchy that could scroll.
Calling requestDisallowInterceptTouchEvent(true) on the outermost NestedScrollView.
Main Activity:
Fragment w/ outer NestedScrollView:
Each item in ViewPager:
app:layout_behavior="#string/appbar_scrolling_view_behavior"
set this line in ViewPager it will help you

ViewPager swipe guesture not working when there's a NestedScrollView inside

I want to implement a viewpager with fragments inside, one of the fragments has the NestedScrollView inside, but when I put the NestedScrollView inside the layout of a fragment and run the project . The app shows as the picture below:
The scroll gesture of NestedScrollView working well with the AppBarLayout, but NestedScrollView prevents the swipe gesture of viewpager. When the NestedScrollView scrolls down a little,the AppBarLayout collapsed ,the swipe gesture cannot fired, so I cannot move to the next page of viewpager. This only happens with the NestedScrollView, the RecyclerView works well .
How can I make the NestedScrollView working well with the fragment?
This is the demo I told above: demo ,please change the layout of the fragment inside viewpager with the layout below:
lipsum is the very very long string

ViewPager + PagerTabStrip inside ScrollView. It's possible?

That's the idea:
A ViewPager(Horizontal) insde ScrollView(Vertical). ViewPager will show diferents fragments depending on the tab, and has vertical scroll to show all fragment view on the screen.
But the thing is ViewPager isn't showing the fragment entirely, it doesn't expand the fragment's height or the ScrollView height.
There's a way to expand dinamically the ViewPager height or the ScrollView height to show completely the fragment using scroll?
<ScrollView>
<ImageView/>
<ViewPager>
<PagerTabStrip/>
</ViewPager>
<Button/> </ScrollView>
Rather than putting the ScrollView outside the ViewPager, instead you should make any views that populate the ViewPager (and need to scroll) ScrollViews.
This way each view (in the view pager) will have it's own vertical scroll offset that will be remembered as you page through the views.

Flip ViewPager like ViewFlipper

I have implemented ViewPager to swipe between multiple views.
What i want is to flip each of the view in viewpager like Viewflipper.
Placing viewflipper inside viewpager in xml layout generates random layout.

Categories

Resources