public boolean isBottom(final ListView listView) {
boolean result=false;
if (listView.getLastVisiblePosition() == (listView.getCount() - 1)) {
final View bottomChildView = listView.getChildAt(listView.getLastVisiblePosition() - listView.getFirstVisiblePosition());
result= (listView.getHeight()>=bottomChildView.getBottom());
};
return result;
}
public boolean isTop(final ListView listView) {
boolean result=false;
if(listView.getFirstVisiblePosition()==0){
final View topChildView = listView.getChildAt(0);
result=topChildView.getTop()==0;
}
return result ;
}