private void showSearchHistory() { // Add header to the history String headerText = getString(R.string.history); showListHeader(headerText); MediaDatabase db = MediaDatabase.getInstance(this); mHistoryAdapter.clear(); ArrayList<String> history = db.getSearchhistory(20); for (String s : history) mHistoryAdapter.add(s); mHistoryAdapter.notifyDataSetChanged(); setListAdapter(mHistoryAdapter); }