private void initiateRefresh() {
        Log.i(LOG_TAG, "initiateRefresh");

        /**
         * Execute the background task, which uses {@link android.os.AsyncTask} to load the data.
         */
        new DummyBackgroundTask().execute();
    }
By abstracting the refresh process to a single method, the app allows both the
SwipeGestureLayout onRefresh() method and the Refresh action item to refresh the content.
SwipeRefreshLayoutBasic/Application/src/main/java/com/example/android/swiperefreshlayoutbasic/SwipeRefreshLayoutBasicFragment.java