protected void onListItemClick(ListView l, View v, int position, long id) { ListAdapter a = (ListAdapter) getListAdapter(); if (a != null) { LastFMApplication.getInstance().mCtx = this; String URI = (String) a.getItem(position); Intent i = new Intent(this, ProfileActivity.class); i.setData(Uri.parse(URI)); startActivity(i); } }
@Override public void onPreExecute() { String[] strings = new String[] {"Searching"}; ListAdapter adapter = new ListAdapter(SearchActivity.this, strings); adapter.disableDisclosureIcons(); adapter.setDisabled(); adapter.enableLoadBar(0); setListAdapter(adapter); getListView().setVisibility(View.VISIBLE); }
@Override public void onPostExecute(ArrayList<ListEntry> iconifiedEntries) { ListAdapter adapter; if (iconifiedEntries != null) { adapter = new ListAdapter(SearchActivity.this, mImageCache); adapter.setSourceIconified(iconifiedEntries); } else { String[] strings = new String[] {getString(R.string.newstation_noresults)}; adapter = new ListAdapter(SearchActivity.this, strings); adapter.disableDisclosureIcons(); adapter.setDisabled(); } setListAdapter(adapter); getListView().setVisibility(View.VISIBLE); }