Code example for ListFragment

Methods: onViewCreatedsetListAdapter, getActivity, getLoaderManager

    private PartiesAdapter adapter;
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        getLoaderManager().initLoader(LoaderId.getId(), null, this);
        adapter = new PartiesAdapter(getActivity(), null);
    public Loader<Cursor> onCreateLoader(int i, Bundle bundle) {
        return new CursorLoader(getActivity(), PartyContract.URI, null, null, null, null);
Connect your IDE to all the code out there  Get Codota for Java