Code example for SimpleAdapter

0
public class MainActivity extends ListActivity {
	@Override 
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setListAdapter(
			new SimpleAdapter(
				this, getData(), android.R.layout.simple_list_item_1, new String[]{"title"}, new int[]{android.R.id.text1}
			) 
		); 
		getListView().setScrollbarFadingEnabled(false);
	} 
	 
	@Override 
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.main, menu);
		return true; 
	} 
 
	@Override 
	public boolean onOptionsItemSelected(MenuItem item) {
Stop searching for code, let great code find you!  Add Codota to your java IDE