@Override public View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { organizerService = new OrganizerService(getActivity().getApplicationContext()); adapter = new OrganizerListAdapter(getActivity(), organizerService.getOrganizerList()); setListAdapter(adapter); return inflater.inflate(R.layout.list_organizer, container, false); }
@Override public void onListItemClick(ListView l, View v, int position, long id) { long orgId = adapter.organizers.get((Integer) v.findViewById(R.id.organizer_item).getTag()).getId(); organizerService.viewOrg(getFragmentManager(), context, orgId); }