这个Menu选择菜单选择只要在Activity继承类里实现以下方法就可以了

MyList.java类:

package iaiai.test;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Toast;

public class MyList extends Activity {

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
menu.add(Menu.NONE, 1, 0, "诊断");
menu.add(Menu.NONE, 2, 0, "结单");
menu.add(Menu.NONE, 3, 0, "回复收到");
return super.onCreateOptionsMenu(menu);
}

@Override
public void openOptionsMenu() {
super.openOptionsMenu();
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
String temp = "";
switch (item.getItemId()) {
case 1:
temp = "诊断";
break;
case 2:
temp = "结单";
break;
case 3:
temp = "回复收到";
break;
default:
break;
}
Toast.makeText(this, temp + "處理", Toast.LENGTH_LONG).show();
return super.onOptionsItemSelected(item);
}

}


[img]http://dl.iteye.com/upload/attachment/490442/fb314de7-68ef-3cf2-a322-c47e52b9f988.jpg[/img]


[img]http://dl.iteye.com/upload/attachment/490444/24ef3efc-f682-3356-8a51-cb0f38e4f5b7.jpg[/img]