Code example for TreeMap

Methods: put

0
		String[] listArray = slMenuMap.keySet().toArray(new String[0]);
		setListAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, listArray));
	} 
	 
	private void populateSLMap() { 
	  slMenuMap.put("Create an entry", "com.ravis.softlock.SoftLockCreateActivity");
	  slMenuMap.put("Modify existing entry", "com.ravis.softlock.SoftLockUpdateActivity");
	  slMenuMap.put("Delete an entry", "com.ravis.softlock.SoftLockUpdateActivity");
	  slMenuMap.put("Search entry", "com.ravis.softlock.SoftLockUpdateActivity");
	  slMenuMap.put("Change password", "com.ravis.softlock.SoftLockPasswordChangeActivity");
	} 
	 
	@Override 
	protected void onListItemClick(ListView l, View v, int position, long id) {
		 
		super.onListItemClick(l, v, position, id);
		try { 
			String selection = l.getItemAtPosition(position).toString();
			 
			Log.d("DEBUG>>>" , selection  + "   .... " + position);