Code example for ListView

Methods: getItemAtPosition

	protected void onListItemClick(ListView l, View v, int position, long id) {
		Map<String, Object> map = (Map<String, Object>) l.getItemAtPosition(position);
		Intent intent = new Intent(this, (Class<? extends Activity>)map.get("activity"));
	private List<? extends Map<String, ?>> getData() {
		List<Map<String, Object>> data = new ArrayList<Map<String, Object>>();
		addItem(data, "TextViews", FlipTextViewActivity.class);
		addItem(data, "Buttons", FlipButtonActivity.class);
		addItem(data, "Complex Layouts", FlipComplexLayoutActivity.class);
		addItem(data, "Async Content", FlipAsyncContentActivity.class);
		addItem(data, "Event Listener", FlipTextViewAltActivity.class);
		addItem(data, "Horizontal", FlipHorizontalLayoutActivity.class);
		addItem(data, "Issue #5", Issue5Activity.class);
		addItem(data, "XML Configuration", FlipTextViewXmlActivity.class);
Connect your IDE to all the code out there  Get Codota for Java