listview.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_MOVE) {
Log.d("Measure","listview.getListPaddingTop():"+listview.getListPaddingTop()+" listview.getTop():"+listview.getTop()+"listview.getChildAt(0).getTop():"+listview.getChildAt(0).getTop());if (listview.getFirstVisiblePosition() ==0&&
listview.getChildAt(0).getTop() >= listview.getListPaddingTop()) {
refrashLayout.setEnabled(true);Log.d("TAG","reach top!!!");}else refrashLayout.setEnabled(false);}
return false;}
});
网友评论