androidobservablescrollview 怎么判断滚动停止
展开全部
在滚动的视图观测滚动事件的Android库
它易于与在Android 5.0 Lollipop中引入的工具条Toolbar相交互,并能够帮助实现Material Design apps的外观。
支持的控件
Widget
Since
Note
ListView v1.0.0
ScrollView v1.0.0
WebView v1.0.0
RecyclerView v1.1.0 It's supported but RecyclerView provides scroll states and position withOnScrollListener. You should use it if you don't have any reason.
GridView -
@Override
public void onUpOrCancelMotionEvent(ScrollState scrollState) {
ActionBar ab = getSupportActionBar();
if (scrollState == ScrollState.UP) {
if (ab.isShowing()) {
ab.hide();
}
} else if (scrollState == ScrollState.DOWN) {
if (!ab.isShowing()) {
ab.show();
}
}
}
它易于与在Android 5.0 Lollipop中引入的工具条Toolbar相交互,并能够帮助实现Material Design apps的外观。
支持的控件
Widget
Since
Note
ListView v1.0.0
ScrollView v1.0.0
WebView v1.0.0
RecyclerView v1.1.0 It's supported but RecyclerView provides scroll states and position withOnScrollListener. You should use it if you don't have any reason.
GridView -
@Override
public void onUpOrCancelMotionEvent(ScrollState scrollState) {
ActionBar ab = getSupportActionBar();
if (scrollState == ScrollState.UP) {
if (ab.isShowing()) {
ab.hide();
}
} else if (scrollState == ScrollState.DOWN) {
if (!ab.isShowing()) {
ab.show();
}
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询