Code example for SortedMap

Methods: keySet

0
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
 
		prepareMenu(); 
 
		String[] keys = actions.keySet().toArray(
				new String[actions.keySet().size()]);
 
		setListAdapter(new ArrayAdapter<String>(this,
				android.R.layout.simple_list_item_1, keys));
	} 
	 
	public void addMenuItem(String label, Class<?> cls){
		actions.put(label, new Intent(this, cls	));
	} 
	 
	abstract void prepareMenu(); 
}