Code example for ListFragment

Methods: setEmptyTextsetListAdapter, getActivity, getLoaderManager, onActivityCreated

public class RssFragment extends ListFragment implements LoaderCallbacks<Cursor> {
    private CursorAdapter adapter;
    @Override public void onActivityCreated(Bundle savedInstanceState) {
        setEmptyText("No items");
        adapter = new MyAdapter(getActivity(), null, true);
        getLoaderManager().initLoader(0, null, this);
    public class MyAdapter extends CursorAdapter {
		public MyAdapter(Context context, Cursor c, boolean autoRequery) {
			super(context, c, autoRequery);
		public void bindView(View view, Context context, Cursor cursor) {
Connect your IDE to all the code out there  Get Codota for Java