Code example for ListFragment

Methods: onCreate

0
        android.R.id.text2
    }; 
 
    @Override 
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    } 
 
    @Override 
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        this.setEmptyText(this.getString(R.string.empty));
        // No cursor yet. Will be assigned when the CursorLoader query is complete 
        SimpleCursorAdapter adapter = new SimpleCursorAdapter(this.getActivity(),
            android.R.layout.simple_list_item_2, null, App.USER_STATUS_PROJECTION, IDS, 0);
        setListAdapter(adapter);
        // Set up our cursor loader. It manages the cursors from now on 
        getLoaderManager().initLoader(App.LIST_LOADER_ID, null, this);
    } 
 
    @Override