简体   繁体   中英

Disable 'app:layout_behavior=“@string/appbar_scrolling_view_behavior”' for child fragment

I have a parent fragment with CoordinatorLayout for scrolling inside nested fragments but I want to disable ToolBar 'hiding' for a fragment that doesn't need it.

3 out of 5 fragments have a TabLayout that it is needed but the other does not need it.

How do I disable it for these other fragments?

您可以使用ViewCompat类的帮助来禁用/启用nestedScroll例如: ViewCompat.setNestedScrollingEnabled(myView,false);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM