Code example for ListFragment

Methods: setListAdaptersetListShown, getLoaderManager

0
    } 
 
    @Override 
    public void refresh() { 
        controller.swapCursor(null);
        setListAdapter(controller.getAdapter());
        setListShown(false);
        getLoaderManager().restartLoader(0, null, this);
    } 
 
    @Override 
    public Loader<Cursor> onCreateLoader(int id, Bundle args) {
        args = Objects.nullToEmpty(args);
        controller.setMoreId(args.getString(LOADER_MORE_ID));
        return controller.createLoader();
    } 
 
    @Override 
    public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
        controller.swapCursor(cursor);