Code example for ListFragment

Methods: onListItemClick, getActivity, startActivity

0
	} 
	 
	@Override 
	public void onListItemClick(ListView l, View v, int position, long id) {
		// TODO Auto-generated method stub 
		super.onListItemClick(l, v, position, id);
		if (mPager != null) {
			mPager.setCurrentItem(position);
		} else { 
			Intent intent = new Intent(getActivity().getApplicationContext(), FragmentInfoActivity.class);
			intent.putExtra(SELECTED_ITEM, position);
			startActivity(intent);
		} 
	} 
}