Code example for ListFragment

Methods: getListAdapter, onListItemClick

0
        setListAdapter(new ArtistRGAdapter(getActivity(), artist.getReleaseGroups()));
    } 
 
    @Override 
    public void onListItemClick(ListView l, View v, int position, long id) {
        super.onListItemClick(l, v, position, id);
        ReleaseGroupInfo rg = (ReleaseGroupInfo) getListAdapter().getItem(position);
        startReleaseActivity(rg.getMbid());
    } 
 
    private void startReleaseActivity(String mbid) {
        Intent releaseIntent = new Intent(App.getContext(), ReleaseActivity.class);
        releaseIntent.putExtra(Extra.RG_MBID, mbid);
        startActivity(releaseIntent);
    } 
 
}