Code example for ListFragment

Methods: setListAdaptersetListShown, getLoaderManager, onActivityCreated

0
        return v;
    } 
 
    @Override 
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        setListAdapter(controller.getAdapter());
        setListShown(false);
        getLoaderManager().initLoader(0, null, this);
    } 
 
    @Override 
    public Loader<Cursor> onCreateLoader(int id, Bundle args) {
        return controller.createLoader();
    } 
 
    @Override 
    public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
        controller.swapCursor(cursor);
        setEmptyText(getEmptyText(cursor));
Stop searching for code, let great code find you!  Add Codota to your java IDE