我完全不熟悉Android開發,目前正在研究我的第一個應用程序(不會在市場上出現)。我正在使用此應用程序作爲學習體驗。我沒有受過正規教育,因爲我仍然在讀高中。我的問題是,單擊菜單項後,我不能得到一個文本框出現。另外,我將如何添加更多的項目到我的菜單? 謝謝(對不起,我在android開發中的無知...)。點擊菜單中的項目後,我將如何顯示文本框。 Android
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle item selection
switch (item.getItemId()) {
case R.id.action_settings:
actset();
return true;
default:
return super.onOptionsItemSelected(item);
}
}
private void actset() {
// TODO Auto-generated method stub
System.out.println("Developed By Shirwa Mohamed.. ");
}
你想在哪裏出現文本? – smk 2013-03-10 01:48:38
在彈出框中,點擊菜單中的約項後.. – 2013-03-10 01:49:15