app/src/main/java/com/example/android/quakereport/EarthquakeActivity.java
@Override
    public Loader<ArrayList<EarthquakeData>> onCreateLoader(int i, Bundle bundle) {
        Log.i(LOG_TAG, "Here I return a new object of Earthquake Loader class");
        SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
        String minMagnitude = sharedPreferences.getString(getString(R.string.settings_min_magnitude_key),getString(R.string.settings_min_magnitude_default));
        String orderBy = sharedPreferences.getString(getString(R.string.settings_order_by_key),getString(R.string.settings_min_magnitude_default));
        Uri baseUri = Uri.parse(USGS_URL);
        Uri.Builder uriBuilder = baseUri.buildUpon();
        uriBuilder.appendQueryParameter("format","geojson");
        uriBuilder.appendQueryParameter("limit","10");
        uriBuilder.appendQueryParameter("minmag",minMagnitude);
        uriBuilder.appendQueryParameter("orderby",orderBy);
        return new EarthquakeLoader(this, uriBuilder.toString());
    }
/*
     * Return  an object of  Loader<ArrayList<EarthquakeData>>
     */
Return  an object of  Loader>
Return an object of Loader >
@Override
    public Loader<ArrayList<EarthquakeData>> onCreateLoader(int i, Bundle bundle) {
        Log.i(LOG_TAG, "Here I return a new object of Earthquake Loader class");
        SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
        String minMagnitude = sharedPreferences.getString(getString(R.string.settings_min_magnitude_key),getString(R.string.settings_min_magnitude_default));
        String orderBy = sharedPreferences.getString(getString(R.string.settings_order_by_key),getString(R.string.settings_min_magnitude_default));
        Uri baseUri = Uri.parse(USGS_URL);
        Uri.Builder uriBuilder = baseUri.buildUpon();
        uriBuilder.appendQueryParameter("format","geojson");
        uriBuilder.appendQueryParameter("limit","10");
        uriBuilder.appendQueryParameter("minmag",minMagnitude);
        uriBuilder.appendQueryParameter("orderby",orderBy);
        return new EarthquakeLoader(this, uriBuilder.toString());
    }
@ Override public Loader < ArrayList < EarthquakeData > > onCreateLoader ( int i , Bundle bundle ) { Log . i ( LOG_TAG , "Here I return a new object of Earthquake Loader class" ) ; SharedPreferences sharedPreferences = PreferenceManager . getDefaultSharedPreferences ( this ) ; String minMagnitude = sharedPreferences . getString ( getString ( R . string . settings_min_magnitude_key ) , getString ( R . string . settings_min_magnitude_default ) ) ; String orderBy = sharedPreferences . getString ( getString ( R . string . settings_order_by_key ) , getString ( R . string . settings_min_magnitude_default ) ) ; Uri baseUri = Uri . parse ( USGS_URL ) ; Uri . Builder uriBuilder = baseUri . buildUpon ( ) ; uriBuilder . appendQueryParameter ( "format" , "geojson" ) ; uriBuilder . appendQueryParameter ( "limit" , "10" ) ; uriBuilder . appendQueryParameter ( "minmag" , minMagnitude ) ; uriBuilder . appendQueryParameter ( "orderby" , orderBy ) ; return new EarthquakeLoader ( this , uriBuilder . toString ( ) ) ; }
Return  an object of  Loader<ArrayList<EarthquakeData>>
Return an object of Loader<ArrayList<EarthquakeData >>