app/src/main/java/com/example/android/quakereport/EarthquakeActivity.java
@Override
    public void onLoadFinished(Loader<ArrayList<EarthquakeData>> loader, ArrayList<EarthquakeData> earthquakeData) {
        // Clear the adapter of previous earthquake data
        adapter.clear();
        Log.i(LOG_TAG, "Updating the UI");
        textEmpty.setText(R.string.emptyStateMessage);
        // If there is a valid list of {@link Earthquake}s, then add them to the adapter's
        // data set. This will trigger the ListView to update.
        if (earthquakeData != null && !earthquakeData.isEmpty()) {
            p1.setVisibility(View.GONE);
            adapter.addAll(earthquakeData);
        } else {
            adapter.clear();
            textEmpty.setText(R.string.emptyStateMessage);
        }
    }
/*
     * here i can update the UI
     */
here i can update the UI
here i can update the UI
@Override
    public void onLoadFinished(Loader<ArrayList<EarthquakeData>> loader, ArrayList<EarthquakeData> earthquakeData) {
        adapter.clear();
        Log.i(LOG_TAG, "Updating the UI");
        textEmpty.setText(R.string.emptyStateMessage);
        if (earthquakeData != null && !earthquakeData.isEmpty()) {
            p1.setVisibility(View.GONE);
            adapter.addAll(earthquakeData);
        } else {
            adapter.clear();
            textEmpty.setText(R.string.emptyStateMessage);
        }
    }
@ Override public void onLoadFinished ( Loader < ArrayList < EarthquakeData > > loader , ArrayList < EarthquakeData > earthquakeData ) { adapter . clear ( ) ; Log . i ( LOG_TAG , "Updating the UI" ) ; textEmpty . setText ( R . string . emptyStateMessage ) ; if ( earthquakeData != null && ! earthquakeData . isEmpty ( ) ) { p1 . setVisibility ( View . GONE ) ; adapter . addAll ( earthquakeData ) ; } else { adapter . clear ( ) ; textEmpty . setText ( R . string . emptyStateMessage ) ; } }
here i can update the UI
here i can update the UI
// Clear the adapter of previous earthquake data // If there is a valid list of {@link Earthquake}s, then add them to the adapter's // data set. This will trigger the ListView to update.