AndroidTreeView icon indicating copy to clipboard operation
AndroidTreeView copied to clipboard

Scrolling behavior with collapsed toolbar

Open antoniusnaumann opened this issue 9 years ago • 1 comments

Hi!

I am using a fragment inside an activity with a collapsing toolbar. Inside this fragment, I placed my TreeView. All works as intended but I have no idea how I could add a behavior to collapse toolbar when TreeView is scrolled.

The Fragment is placed by a FragmentManager inside a frame layout. The FrameLayout is placed in a linear layout with "app:layout_behavior="@string/appbar_scrolling_view_behavior" ". If I use a RecyclerView the scrolling affects the collapsing toolbar as intended.

Can I achieve the same with TreeView? Is there a way to tell the layout that the TreeView is scrolled?

EDIT: It seems like there is a problem with scrolling on the collapsed toolbar layout. It does not collapse and the TreeView can't scroll its full size.

antoniusnaumann avatar Mar 09 '16 10:03 antoniusnaumann

I guess you are using CoordinatorLayout, as I know the ScrollView does not cooperate with the CoordinatorLayout. You would need to use NestedScrollView instead of ScrollView. Maybe you can try to modify sources view = use2dScroll ? new TwoDScrollView(newContext) : new ScrollView(newContext); and try to use NestedScrollView,

bmelnychuk avatar Mar 16 '16 08:03 bmelnychuk