参考:http://blog.csdn.net/zhangyalong_android/article/details/53112647
1.scroll:值设为scroll
的View会跟随滚动事件一起发生移动;
所有想滚动出屏幕的view都需要设置这个flag,没有设置这个flag的view将被固定在屏幕顶部。
2.enterAlways:值设为enterAlways
的View,当ScrollView往下滚动时,该View会直接往下滚动,而不用考虑ScrollView是否在滚动;
这个flag让任意向下的滚动都会导致该view变为可见,如启用快速“返回模式”。
3.exitUntilCollapsed:值设为exitUntilCollapsed
的View,当这个View要往上逐渐“消逝”时,会一直往上滑动,直到剩下的的高度达到它的最小高度后,再响应ScrollView的内部滑动事件。
4.enterAlwaysCollapsed:是enterAlways
的附加选项,一般跟enterAlways
一起使用,它是指,View在往下“出现”的时候,首先是enterAlways
效果,当View的高度达到最小高度时(注意你的view需要设置minHeight属性),View就暂时不去往下滚动,直到ScrollView滑动到顶部不再滑动时,View再继续往下滑动,直到滑到View的顶部结束。
需要注意的是,后面两种模式基本只有在CollapsingToolbarLayout才有用。