Best code examples for Fragment getLoaderManager method (android.app.Fragment.getLoaderManager)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Fragment getLoaderManager method.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Fragment getLoaderManager examples from Open Source projects
This code example shows how to use the following methods: getLoaderManager, onCreate
		return view;
	} 
	 
	@Override 
	public void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		getLoaderManager().initLoader(0, null, this);
	} 
	 
	@Override 
	public void onResume(){ 
		super.onResume(); 
		//getLoaderManager().restartLoader(0, null, this); 
	} 
	@Override 
	public void onPause(){ 
		super.onPause(); 
	} 
 
	public static TrendFragment newInstance() { 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getActivity, getLoaderManager, onActivityCreated
    public FenceDetailFragment() { 
        super(); 
    } 
 
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        activity = getActivity();
        contentResolver = activity.getContentResolver();
 
        if (fenceUri != null) {
            getLoaderManager().initLoader(0, null, this);
        } else { 
            // New fence (set default values) 
            Location location = getLastLocationFinder(getActivity()).getLastBestLocation(0, 0);
            if (location != null) {
                nameEditText.setText("fence");
                latitudeEditText.setText(location.getLatitude() + "");
                longitudeEditText.setText(location.getLongitude() + "");
                radiusEditText.setText("500");
                typeRadioGroup.check(typeRadioGroup.getChildAt(0).getId());
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getLoaderManager, onActivityCreated
		return view;
	} 
 
	@Override 
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
 
		Bundle loaderArgs = new Bundle();
		loaderArgs.putInt("showId", showId);
		getLoaderManager().initLoader(0, loaderArgs, this);
	} 
 
	@Override 
	public Loader<Cursor> onCreateLoader(int id, Bundle args) {
		int showId = args.getInt("showId");
		Uri uri = Uri.withAppendedPath(ShowsProvider.CONTENT_URI_SHOWS,
		                               new Integer(showId).toString());
		String[] projection = {
			ShowsTable.COLUMN_OVERVIEW, 
			ShowsTable.COLUMN_FIRST_AIRED 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getActivity, getLoaderManager, onActivityCreated
        return v;
    } 
 
    @Override 
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
 
        mApplication = (SecretDiaryApplication) getActivity().getApplication();
 
        // Prepare the loader.  Either re-connect with an existing one, or start a new one. 
        getLoaderManager().initLoader(0, null, this);
    } 
 
    @Override 
    public Loader<Cursor> onCreateLoader(int i, Bundle bundle) {
        return null;  //To change body of implemented methods use File | Settings | File Templates. 
    } 
 
    @Override 
    public void onLoadFinished(Loader<Cursor> cursorLoader, Cursor cursor) {
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getLoaderManager, onActivityCreated
public class ContractionAverageFragment extends Fragment implements LoaderManager.LoaderCallbacks<Cursor>
{ 
	@Override 
	public void onActivityCreated(final Bundle savedInstanceState)
	{ 
		super.onActivityCreated(savedInstanceState);
		getLoaderManager().initLoader(0, null, this);
	} 
 
	@Override 
	public Loader<Cursor> onCreateLoader(final int id, final Bundle args)
	{ 
		final String[] projection = { ContractionContract.Contractions.COLUMN_NAME_START_TIME,
				ContractionContract.Contractions.COLUMN_NAME_END_TIME }; 
		final String selection = ContractionContract.Contractions.COLUMN_NAME_START_TIME + ">?";
		final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getActivity());
		final long averagesTimeFrame = Long.parseLong(preferences.getString(
				Preferences.AVERAGE_TIME_FRAME_PREFERENCE_KEY, 
				getString(R.string.pref_settings_average_time_frame_default)));
		final long timeCutoff = System.currentTimeMillis() - averagesTimeFrame;
Full Snippet Info
5
CodeRank
Related Fragment getLoaderManager Questions & Answers:
getLoaderManager Method Overview
Return the LoaderManager for this fragment, creating it if needed.
See Code Examples for other Android Fragment Methods: