Code example for ListFragment

Methods: getListAdapter, onListItemClick, startActivity

0
        setListAdapter(new WeblinkAdapter(getActivity(), artist.getLinks()));
    } 
 
    @Override 
    public void onListItemClick(ListView l, View v, int position, long id) {
        super.onListItemClick(l, v, position, id);
        WebLink link = (WebLink) getListAdapter().getItem(position);
        startBrowserLink(link.getUrl());
    } 
 
    private void startBrowserLink(String url) {
        startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
    } 
 
}