Code example for ListFragment

Methods: getActivity, getLoaderManager, onActivityCreated, setEmptyText, setListAdapter

0
public class RssFragment extends ListFragment implements LoaderCallbacks<Cursor> {
 
    private CursorAdapter adapter;
 
    @Override public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState); 
        setEmptyText("No items");
        adapter = new MyAdapter(getActivity(), null, true);
        setListAdapter(adapter);
        getLoaderManager().initLoader(0, null, this);
    } 
     
    public class MyAdapter extends CursorAdapter {
 
		public MyAdapter(Context context, Cursor c, boolean autoRequery) {
			super(context, c, autoRequery);
		} 
 
		@Override 
		public void bindView(View view, Context context, Cursor cursor) {
			TextView tv1 = (TextView) view.getTag(R.id.text1);