private void ensureList() {
        if (mListView != null) {
            return;
        }
        View root = getView();
        if (root == null) {
            throw new IllegalStateException("Content view not yet created");
        }
        if (root instanceof ListView) {
            mListView = (ListView)root;
        } else {
            View emptyView = root.findViewById(android.R.id.empty);
            if (emptyView != null) {
                if (emptyView instanceof TextView) {
                    mStandardEmptyView = (TextView) emptyView;
                } else {
                    mEmptyView = emptyView;
                }
            } else {
                mStandardEmptyView.setVisibility(View.GONE);
            }
            mProgressContainer = root.findViewById(R.id.progress_container);
            mListContainer = root.findViewById(R.id.list_container);
            View rawListView = root.findViewById(android.R.id.list);
            if (!(rawListView instanceof ListView)) {
                throw new RuntimeException(
                        "Content has view with id attribute 'android.R.id.list' "
                                + "that is not a ListView class");
            }
            mListView = (ListView)rawListView;
            if (mListView == null) {
                throw new RuntimeException(
                        "Your content must have a ListView whose id attribute is " +
                                "'android.R.id.list'");
            }
            if (mEmptyView != null) {
                mListView.setEmptyView(mEmptyView);
            } else if (mEmptyText != null) {
                mStandardEmptyView.setText(mEmptyText);
                mListView.setEmptyView(mStandardEmptyView);
            }
        }
        mListShown = true;
        mListView.setOnItemClickListener(mOnClickListener);
        if (mAdapter != null) {
            ListAdapter adapter = mAdapter;
            mAdapter = null;
            setListAdapter(adapter);
        } else {
            // We are starting without an adapter, so assume we won't
            // have our data right away and start with the progress indicator.
            if (mProgressContainer != null) {
                setListShown(false, false);
            }
        }
        mHandler.post(mRequestFocus);
    }
Provide the cursor for the list view.
progressfragment/src/com/devspark/progressfragment/ProgressListFragment.java