本文整理汇总了Java中com.github.obsessive.library.pla.PLAAbsListView类的典型用法代码示例。如果您正苦于以下问题:Java PLAAbsListView类的具体用法?Java PLAAbsListView怎么用?Java PLAAbsListView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PLAAbsListView类属于com.github.obsessive.library.pla包,在下文中一共展示了PLAAbsListView类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onScrollStateChanged
import com.github.obsessive.library.pla.PLAAbsListView; //导入依赖的package包/类
@Override
public void onScrollStateChanged(PLAAbsListView view, int scrollState) {
mCurrentScrollState = scrollState;
if (mOnScrollListener != null) {
mOnScrollListener.onScrollStateChanged(view, scrollState);
}
}
示例2: onScroll
import com.github.obsessive.library.pla.PLAAbsListView; //导入依赖的package包/类
@Override
public void onScroll(PLAAbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
if (mOnScrollListener != null) {
mOnScrollListener.onScroll(view, firstVisibleItem,
visibleItemCount, totalItemCount);
}
if (mOnLoadMoreListener != null) {
if (visibleItemCount == totalItemCount) {
mProgressBarLoadMore.setVisibility(View.GONE);
mLabLoadMore.setVisibility(View.GONE);
return;
}
boolean loadMore = firstVisibleItem + visibleItemCount >= totalItemCount;
if (!mIsLoadingMore && loadMore
&& mCurrentScrollState != SCROLL_STATE_IDLE) {
if (!mCanLoadMore) {
mLabLoadMore.setVisibility(View.VISIBLE);
return;
}
mProgressBarLoadMore.setVisibility(View.VISIBLE);
mLabLoadMore.setVisibility(View.GONE);
mIsLoadingMore = true;
onLoadMore();
}
}
}