Code example for ListFragment

Methods: onListItemClick, getActivity, startActivity

0
		adapter = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1, new String[] { "Gallery+Point", "Viewpager+Fragment+Indicator" });
		setListAdapter(adapter);
	} 
	@Override 
	public void onListItemClick(ListView l, View v, int position, long id) {
		super.onListItemClick(l, v, position, id);
		startActivity(new Intent(getActivity(), PhotoActivity.class).putExtra("type", position));
	} 
} 
Experience pair programming with AI  Get Codota for Java