Code example for ListFragment

Methods: isResumed, setListShownNoAnimation

0
		// AreaApplication area = (AreaApplication) 
		// getActivity().getApplication(); 
		// ; 
		// mAdapter.swapCursor(cursor); 
		myAdapter.swapCursor(cursor);
		if (isResumed()) {
			setListShown(true);
		} else { 
			Log.d(TAG, "Activity is not being resumed");
			setListShownNoAnimation(true);
			try { 
				myAdapter.setSelectedPosition(act.getPosition());
			} catch (NullPointerException e) {
				// Empty list or startup activy incomplete 
			} 
		} 
	} 
 
	@Override 
	public void onLoaderReset(Loader<Cursor> arg0) {
		//myAdapter.swapCursor(null);