[英]How to hide toolbar while scrolling efficientliy in relativeLayout?
I'm trying to hide the toolbar by making it invisible
while scrolling and visible
on stop,but it's not smooth .我试图通过在滚动时使其
invisible
并在停止时visible
来隐藏工具栏,但它并不平滑。
Can anyone please suggest any better option for hiding toolbar elegantly while scrolling in relativeLayout
任何人都可以提出更好的选择,以便在
relativeLayout
布局中滚动时优雅地隐藏工具栏
Not sure this is what you want, but this can make the system UI smooth show/hide when scrolling.不确定这是您想要的,但这可以使系统 UI 在滚动时平滑显示/隐藏。 SeeUsing Immersive Full-Screen Mode
请参阅使用沉浸式全屏模式
You should use the Coordinator Layout as a parent in the xml file.您应该使用 Coordinator Layout 作为 xml 文件中的父级。 Coordinator Layout is designed to support this type of actions and "synchronise" this actions.
协调器布局旨在支持此类操作并“同步”这些操作。
The is a good tutorial here: https://mzgreen.github.io/2015/06/23/How-to-hideshow-Toolbar-when-list-is-scrolling(part3)/这是一个很好的教程: https : //mzgreen.github.io/2015/06/23/How-to-hideshow-Toolbar-when-list-is-scrolling(part3)/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.