Code example for ListFragment

Methods: getActivity, getArguments, getLoaderManager, onActivityCreated

0
		                        false); 
	} 
 
	@Override 
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
 
		// if the loader exists and it's busy loading 
		// then spin the progress bar. 
		Loader loader = getLoaderManager().getLoader(0);
		if (loader != null) {
			getActivity().setProgressBarIndeterminateVisibility(loader.isStarted());
		} 
 
		String query = getArguments().getString("query");
		Bundle loaderArgs = new Bundle();
		loaderArgs.putString("query", query);
 
		getLoaderManager().initLoader(0, loaderArgs, this);
	} 
 
	@Override 
	public Loader<List<Show>> onCreateLoader(int id, Bundle args) {
		getActivity().setProgressBarIndeterminateVisibility(true);
Stop searching for code, let great code find you!  Add Codota to your java IDE