Lesson05b-Smarter-GitHub-Repo-Search/T05b.02-Exercise-AddAsyncTaskLoader/app/src/main/java/com/example/android/asynctaskloader/MainActivity.java
private void makeGithubSearchQuery() {
        if (TextUtils.isEmpty(githubQuery)) {
            mUrlDisplayTextView.setText("No query entered, nothing to search for.");
            return;
        }

        URL githubSearchUrl = NetworkUtils.buildUrl(githubQuery);
        mUrlDisplayTextView.setText(githubSearchUrl.toString());

        Bundle queryBundle = new Bundle();
        queryBundle.putString(SEARCH_QUERY_URL_EXTRA, githubSearchUrl.toString());

        LoaderManager loaderManager = getSupportLoaderManager();
        Loader<String> githubSearchLoader = loaderManager.getLoader(GITHUB_SEARCH_LOADER);
        if (githubSearchLoader == null) {
            loaderManager.initLoader(GITHUB_SEARCH_LOADER, queryBundle, this);
        } else {
            loaderManager.restartLoader(GITHUB_SEARCH_LOADER, queryBundle, this);
        }
    }
/**
     * This method retrieves the search text from the EditText, constructs the
     * URL (using {@link NetworkUtils}) for the github repository you'd like to find, displays
     * that URL in a TextView, and finally request that an AsyncTaskLoader performs the GET request.
     */
This method retrieves the search text from the EditText, constructs the
URL (using  NetworkUtils) for the github repository you'd like to find, displays
that URL in a TextView, and finally request that an AsyncTaskLoader performs the GET request.
This method retrieves the search text from the EditText constructs the URL ( using NetworkUtils ) for the github repository you ' d like to find displays that URL in a TextView and finally request that an AsyncTaskLoader performs the GET request .
private void makeGithubSearchQuery() {
        if (TextUtils.isEmpty(githubQuery)) {
            mUrlDisplayTextView.setText("No query entered, nothing to search for.");
            return;
        }
        URL githubSearchUrl = NetworkUtils.buildUrl(githubQuery);
        mUrlDisplayTextView.setText(githubSearchUrl.toString());
        Bundle queryBundle = new Bundle();
        queryBundle.putString(SEARCH_QUERY_URL_EXTRA, githubSearchUrl.toString());
        LoaderManager loaderManager = getSupportLoaderManager();
        Loader<String> githubSearchLoader = loaderManager.getLoader(GITHUB_SEARCH_LOADER);
        if (githubSearchLoader == null) {
            loaderManager.initLoader(GITHUB_SEARCH_LOADER, queryBundle, this);
        } else {
            loaderManager.restartLoader(GITHUB_SEARCH_LOADER, queryBundle, this);
        }
    }
private void makeGithubSearchQuery ( ) { if ( TextUtils . isEmpty ( githubQuery ) ) { mUrlDisplayTextView . setText ( "No query entered, nothing to search for." ) ; return ; } URL githubSearchUrl = NetworkUtils . buildUrl ( githubQuery ) ; mUrlDisplayTextView . setText ( githubSearchUrl . toString ( ) ) ; Bundle queryBundle = new Bundle ( ) ; queryBundle . putString ( SEARCH_QUERY_URL_EXTRA , githubSearchUrl . toString ( ) ) ; LoaderManager loaderManager = getSupportLoaderManager ( ) ; Loader < String > githubSearchLoader = loaderManager . getLoader ( GITHUB_SEARCH_LOADER ) ; if ( githubSearchLoader == null ) { loaderManager . initLoader ( GITHUB_SEARCH_LOADER , queryBundle , this ) ; } else { loaderManager . restartLoader ( GITHUB_SEARCH_LOADER , queryBundle , this ) ; } }
This method retrieves the search text from the EditText, constructs the
 URL (using {@link NetworkUtils}) for the github repository you'd like to find, displays
 that URL in a TextView, and finally request that an AsyncTaskLoader performs the GET request.
This method retrieves the search text from the EditText constructs the URL ( using { @link NetworkUtils } ) for the github repository you ' d like to find displays that URL in a TextView and finally request that an AsyncTaskLoader performs the GET request .