Code example for AbsListView

Methods: getChildAt, getFirstVisiblePosition, getTop

0
                // but you can call any function here. 
                new PostListTask().execute( currentPage + 1 );
                loading = true;
            } 
 
            index = view.getFirstVisiblePosition();
            top = view.getChildAt(0) == null ? 0 : view.getTop();
        } 
    } 
 
    /** 
     * Represents an asynchronous login/registration task used to authenticate 
     * the user. 
     */ 
    public class PostListTask extends AsyncTask<Integer, Void, ArrayList<HashMap<String, String>>> {
        @Override 
        protected ArrayList<HashMap<String, String>> doInBackground(Integer... params){
            try{ 
                return HiPda.getPosts(fid, params[0]);
            }catch(Exception e){
                e.printStackTrace();