/** * Display the acronym expansions to the user. * * @param results List of acronym expansions to display. */ public void displayResults(List<AcronymExpansion> results, String errorMessage) { Log.d(TAG, "results = " + results); if (results == null || results.size() == 0) Utils.showToast(this, errorMessage); else { Log.d(TAG, "displayResults() with number of acronyms = " + results.size()); // Add the results to the Adapter and notify changes. mAdapter.clear(); mAdapter.addAll(results); mAdapter.notifyDataSetChanged(); } }
/** Reset the display prior to attempting to expand a new acronym. */ private void resetDisplay() { Utils.hideKeyboard(this, mEditText.getWindowToken()); mAdapter.clear(); mAdapter.notifyDataSetChanged(); }