package org.crazyit.menu;

import org.crazyit.menu.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.SubMenu;

/**
 * Description:
 * <br/>site: <a href="http://www.crazyit.org">crazyit.org</a> 
 * <br/>Copyright (C), 2001-2012, Yeeku.H.Lee
 * <br/>This program is protected by copyright laws.
 * <br/>Program Name:
 * <br/>Date:
 * @author  Yeeku.H.Lee kongyeeku@163.com
 * @version  1.0
 */
public class ActivityMenu extends Activity
{
	@Override
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
	}
	@Override
	public boolean onCreateOptionsMenu(Menu menu)
	{
		// -------------ÏòmenuÖÐÌí¼Ó×Ó²Ëµ¥-------------
		SubMenu prog = menu.addSubMenu("Æô¶¯³ÌÐò");
		// ÉèÖÃ²Ëµ¥µÄÍ¼±ê
		prog.setIcon(R.drawable.tools);
		// ÉèÖÃ²Ëµ¥Í·µÄÍ¼±ê
		prog.setHeaderIcon(R.drawable.tools);
		// ÉèÖÃ²Ëµ¥Í·µÄ±êÌâ
		prog.setHeaderTitle("Ñ¡ÔñÄúÒªÆô¶¯µÄ³ÌÐò");	
		// Ìí¼Ó²Ëµ¥Ïî
		MenuItem item = prog.add("²é¿´¾­µäJava EE");
		//Îª²Ëµ¥ÏîÉèÖÃ¹ØÁªµÄActivity
		item.setIntent(new Intent(this , OtherActivity.class));
		return super.onCreateOptionsMenu(menu);
	}
}