`

下拉刷新,上拉更多,XListView修改版以及TestPullScroll通用版修改版

 
阅读更多
XListView的bug修正版

重写了
@Override
public boolean performItemClick(View view, int position, long id) {
// ==[0,headerCount) [headerCount,count-footerCount) count-footerCount,getCount]==//

int headerCount = getHeaderViewsCount();
int footerCount = getFooterViewsCount();
int count = getCount();
if (position >= headerCount && position < count - footerCount) {
position -= headerCount;
return super.performItemClick(view, position, id);
} else {
return true;
}

}
这样在执行onItemClick时就不会出现footer和header的位置事件

并对onTouchEvent的执行作了限定
if (mEnablePullLoad || mEnablePullRefresh) {

其他均未作修改。

第二个TestPullScroll为网上流传的下拉刷新,上拉刷新。
第三个为依据TestPullScroll修改的通用版本下拉刷新,上拉更多。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics