Code example for ListFragment

Methods: getActivity, getFragmentManager, getListView

		mCurCheckPosition = index;
		if (mDualPane) {
			// We can display everything in-place with fragments. 
            // Have the list highlight this item and show the data. 
			getListView().setItemChecked(index, true);
			// Check what fragment is shown, replace if needed. 
			DataViewFragment details = (DataViewFragment) getFragmentManager().findFragmentById(mId);			
			if (details == null || details.getShownIndex() != index) {
                // Make new fragment to show this selection. 
                details = DataViewFragment.newInstance(index, mId);
                // Execute a transaction, replacing any existing 
                // fragment with this one inside the frame. 
                FragmentTransaction ft = getFragmentManager().beginTransaction();
                ft.replace(mId, details);
                StackScrollView stackScrollView = ((RootViewController)getActivity()).getStackScrollView();
                stackScrollView.addViewInSlider(details, true);
			details = null;
		} else {