Code example for AbsListView

Methods: setOnTouchListenersetOnScrollListener, setOnItemSelectedListener

0
        if (mManaged != null) {
            AbsListView absListView = mManaged.getAbsListView();
 
            // These listeners will still run the current list view 
            // listeners as delegates. See ItemManaged. 
            absListView.setOnScrollListener(new ScrollManager());
            absListView.setOnTouchListener(new FingerTracker());
            absListView.setOnItemSelectedListener(new SelectionTracker());
        } 
    } 
 
    void loadItem(View itemView, int position) {
        AbsListView absListView = mManaged.getAbsListView();
        Adapter adapter = absListView.getAdapter();
 
        boolean shouldDisplayItem =
                (mScrollState != OnScrollListener.SCROLL_STATE_FLING && !mPendingItemsUpdate);
 
        // This runs on each Adapter.getView() call. Will only trigger an 
        // actual item loading request if the view is not being flung or finger 
Experience pair programming with AI  Get Codota for Java