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);
}
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));
}
}
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);
}
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();
}
}
Aggregations