Search in sources :

Example 1 with ReleaseInfoAdapter

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

the class CollectionFragment method onListItemClick.

@Override
public void onListItemClick(ListView l, View v, int position, long id) {
    ReleaseInfoAdapter adapter = (ReleaseInfoAdapter) getListAdapter();
    String releaseMbid = adapter.getItem(position).getReleaseMbid();
    Intent intent = new Intent(appContext, ReleaseActivity.class);
    intent.putExtra(Extra.RELEASE_MBID, releaseMbid);
    startActivity(intent);
}
Also used : Intent(android.content.Intent) ReleaseInfoAdapter(org.musicbrainz.mobile.adapter.list.ReleaseInfoAdapter)

Example 2 with ReleaseInfoAdapter

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

the class ReleaseSelectionDialog method onActivityCreated.

@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    release = callbacks.getReleasesInfo();
    if (release != null) {
        releaseList.setAdapter(new ReleaseInfoAdapter(getActivity(), R.layout.list_release, release));
    }
}
Also used : ReleaseInfoAdapter(org.musicbrainz.mobile.adapter.list.ReleaseInfoAdapter)

Example 3 with ReleaseInfoAdapter

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

the class BarcodeSearchFragment method handleSearchResults.

private void handleSearchResults(AsyncResult<List<ReleaseInfo>> result) {
    results = result.getData();
    matches.setAdapter(new ReleaseInfoAdapter(getActivity(), R.layout.list_release, results));
    matches.setOnItemClickListener(this);
    matches.setOnItemLongClickListener(this);
    error.setVisibility(View.GONE);
    if (results.isEmpty()) {
        noResults.setVisibility(View.VISIBLE);
        matches.setVisibility(View.INVISIBLE);
    } else {
        matches.setVisibility(View.VISIBLE);
        noResults.setVisibility(View.INVISIBLE);
    }
    searchButton.setEnabled(true);
}
Also used : ReleaseInfoAdapter(org.musicbrainz.mobile.adapter.list.ReleaseInfoAdapter)

Example 4 with ReleaseInfoAdapter

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

the class CollectionFragment method handleResult.

private void handleResult(AsyncResult<UserCollection> result) {
    switch(result.getStatus()) {
        case SUCCESS:
            UserCollection collection = result.getData();
            setListAdapter(new ReleaseInfoAdapter(getActivity(), R.layout.list_collection_release, collection.getReleases()));
            break;
        case EXCEPTION:
            showConnectionErrorWarning();
    }
}
Also used : UserCollection(org.musicbrainz.android.api.data.UserCollection) ReleaseInfoAdapter(org.musicbrainz.mobile.adapter.list.ReleaseInfoAdapter)

Aggregations

ReleaseInfoAdapter (org.musicbrainz.mobile.adapter.list.ReleaseInfoAdapter)4 Intent (android.content.Intent)1 UserCollection (org.musicbrainz.android.api.data.UserCollection)1