You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
如果我设置了listview的滑动监听事件,加载更多就失效了?
` mListView.setOnScrollListener(new AbsListView.OnScrollListener() { @OverRide
public void onScrollStateChanged(AbsListView view, int scrollState) {
switch (scrollState){
//滑动停止
case AbsListView.OnScrollListener.SCROLL_STATE_IDLE:
if (currentPosition>=3){
fab.setVisibility(View.VISIBLE);
}
break;
//正在滚动
case AbsListView.OnScrollListener.SCROLL_STATE_TOUCH_SCROLL:
fab.setVisibility(View.GONE);
break;
//手指抛动时滚动
case AbsListView.OnScrollListener.SCROLL_STATE_FLING:
fab.setVisibility(View.GONE);
break;
}
}
@Override
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
currentPosition = totalItemCount;
}
});`
The text was updated successfully, but these errors were encountered:
如果我设置了listview的滑动监听事件,加载更多就失效了?
` mListView.setOnScrollListener(new AbsListView.OnScrollListener() {
@OverRide
public void onScrollStateChanged(AbsListView view, int scrollState) {
switch (scrollState){
//滑动停止
case AbsListView.OnScrollListener.SCROLL_STATE_IDLE:
if (currentPosition>=3){
fab.setVisibility(View.VISIBLE);
}
break;
//正在滚动
case AbsListView.OnScrollListener.SCROLL_STATE_TOUCH_SCROLL:
fab.setVisibility(View.GONE);
break;
//手指抛动时滚动
case AbsListView.OnScrollListener.SCROLL_STATE_FLING:
fab.setVisibility(View.GONE);
break;
}
}
The text was updated successfully, but these errors were encountered: