Code example for SubMenu

Methods: add, setIcon

0
			.setIcon(android.R.drawable.ic_menu_share);//ÉèÖÃͼ±ê
		menu.add(0, 2, 2, "±£´æ")
			.setIcon(android.R.drawable.ic_menu_save);
		/*´´½¨×Ӳ˵¥*/ 
		SubMenu subMenu = menu.addSubMenu(1, 10, 10, "±à¼­");
		subMenu.setIcon(android.R.drawable.ic_menu_edit);//ÉèÖÃͼ±ê
		/*Ôö¼Ó×Ӳ˵¥ÌõÄ¿*/ 
		subMenu.add(2, 11, 11, "Ôö¼Ó");
		subMenu.add(2, 11, 11, "¼õÉÙ");
		return super.onCreateOptionsMenu(menu);
	} 
	/*¼àÌýmenuµã»÷ʼþ*/ 
	@Override 
	public boolean onOptionsItemSelected(MenuItem item) {
		/*¸ù¾ÝidÅжϵã»÷λÖÃ*/ 
		if(item.getItemId() == 1 )
		{ 
			Toast.makeText(this, "Äãµã»÷ÁË·ÖÏí", Toast.LENGTH_LONG).show();
		} 
		else if(item.getItemId() == 2)
		{