Code example for ListFragment

Methods: getListView, getActivity, getView

0
     * Handle {@link VendorsQuery} {@link Cursor}. 
     */ 
    private void onVendorsOrSearchQueryComplete(Cursor cursor) {
        // TODO(romannurik): stopManagingCursor on detach (throughout app) 
        mCursor = cursor;
        getActivity().startManagingCursor(mCursor);
        mAdapter.changeCursor(mCursor);
        if (mCheckedPosition >= 0 && getView() != null) {
            getListView().setItemChecked(mCheckedPosition, true);
        } 
    } 
 
    /** 
     * Handle {@link TracksQuery} {@link Cursor}. 
     */ 
    private void onTrackQueryComplete(Cursor cursor) {
        try { 
            if (!cursor.moveToFirst()) {
                return; 
            } 
Experience pair programming with AI  Get Codota for Java