NestedScrollView inside BottomSheet - android

I have a NestedScrollView inside a BottomSheet.
The problem is just sometimes NestedScrollView doesn't work and dragging on it detaches BottomSheet and starts dragging it.
Is there a bug in NesterScrollView?

Related

Implement ondraglister on an imageview inside Viewpager inside collapsibletoolbar inside appbarlayout

Has anyone tried to implement an ondrag listener on an imageview inside Viewpager inside collapsibletoolbar inside appbarlayout. The ondrag method is not being called in the ontouchlistener.I tried it for viewpager and appbarlayout.
I need to implement a pulldown for a viewpager inside collapsible toolbar which is inside appbarlayout which is inside a co-ordinator layout. I tried the callback to touch listener on viewpager and on appbar but the move actions are returning false from coordinator layout methods.Has anyone tried something similar?
Thanks

ViewPager not responding to horizontal swipe for a couple of seconds after pulling up or pulling down the collapsing toolbar

I have an activity with a CoordinatorLayout as root layout. The root layout contains
1) AppBarLayout(containing the CollapsingToolbarLayout) and
2) ViewPager (app:layout_behavior = "#string/appbar_scrolling_view_behavior").
When I pull the CollapsingToolbarLayout completely up(hidden) or completely down(fully shown), the ViewPager does not respond to horizontal swipes for a couple of seconds, especially fast swipes. The ViewPager somehow starts responding after that. How to solve this problem?

NestedScrollView not scrolling

Ok so I have a global CoordinatorLayout with the following layout
content_main is a FrameLayout that fragments are transacted into. For this particular fragment I have a requirement of placing a TabLayout at a certain % of screenheight, so I went the route of using a ViewPager (with each fragment containing a NestedScrollView to coordinate with the CoordinatorLayout for proper scrolling behavior -- which all works as expected). However my transacted fragment layout (NestedScrollView) is not scrolling at all, however the layout_behavior is working as the AppBar/ToolBar are reacting to a scroll.
Any help on this would be greatly appreciated.
EDIT: I have created a sample project to show current broken behavior. https://github.com/bmc08gt/NestedScrollView-with-ViewPager The intended behavior is for the tablayout to collapse to the toolbar.

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

Categories

Resources