Search in sources :

Example 1 with ArtistSearchAdapter

use of org.musicbrainz.mobile.adapter.list.ArtistSearchAdapter in project musicbrainz-android by jdamcd.

the class SearchActivity method displayArtistResultsView.

private void displayArtistResultsView() {
    ListView artistResultsView = (ListView) findViewById(R.id.searchres_artist_list);
    artistResultsView.setAdapter(new ArtistSearchAdapter(SearchActivity.this, artistSearchResults));
    artistResultsView.setOnItemClickListener(new ArtistItemClickListener());
    artistResultsView.setVisibility(View.VISIBLE);
    if (artistSearchResults.isEmpty()) {
        RelativeLayout artistResults = (RelativeLayout) findViewById(R.id.artist_results_container);
        TextView noRes = (TextView) artistResults.findViewById(R.id.noresults);
        noRes.setVisibility(View.VISIBLE);
    } else {
        saveQueryAsSuggestion();
    }
}
Also used : ListView(android.widget.ListView) RelativeLayout(android.widget.RelativeLayout) ArtistSearchAdapter(org.musicbrainz.mobile.adapter.list.ArtistSearchAdapter) TextView(android.widget.TextView)

Aggregations

ListView (android.widget.ListView)1 RelativeLayout (android.widget.RelativeLayout)1 TextView (android.widget.TextView)1 ArtistSearchAdapter (org.musicbrainz.mobile.adapter.list.ArtistSearchAdapter)1