Code example for SimpleAdapter

0
		result.add(createElement("Local load", "In this example, you provide list of files  to display in gallery"));
		return result;
	} 
	public ListAdapter createAdapter() 
	{ 
		SimpleAdapter adapter = new SimpleAdapter(this, getData(), 
				android.R.layout.simple_list_item_2, 
				new String[]{TITLE, SUBTITLE}, 
				new int[]{android.R.id.text1, android.R.id.text2});
		return adapter;
	} 
 
	@Override 
	protected void onListItemClick(ListView l, View v, int position, long id) {
		Intent i = null;
		switch (position) 
		{ 
		case 0: 
			i = new Intent(this, GalleryUrlActivity.class);
			break; 
		case 1: