Code example for Fragment

Methods: getLoaderManager, onViewCreated

0
    return inflater.inflate(R.layout.list_fragment, container, false);
  } 
 
  @Override 
  public void onViewCreated(final View view, final Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    list = (ListView) view.findViewById(android.R.id.list);
    list.setOnItemClickListener(this);
 
    getLoaderManager().initLoader(LOADER_ID, null, this);
  } 
 
  @Override 
  public Loader<Cursor> onCreateLoader(final int id, final Bundle args) {
    //FIXME 
    return null; 
  } 
 
  @Override 
  public void onLoadFinished(final Loader<Cursor> loader, final Cursor cursor) {
    cursor.setNotificationUri(getActivity().getContentResolver(), Person.Contract.URI);