안드로이드 개발 질문/답변
(글 수 45,052)
메뉴 기능을 추가하여 메뉴버튼을 누를시
보이게 했습니다.
그런데 이 메뉴버튼을 누르지 않고 보여지게 하는 방법은
없는 건가요?
고수님들 부탁드립니다.
xml을 이용하여 메뉴를 구성하였구요.
연결까지 다 잘 됩니다.
메뉴버튼을 누르지 않고 보여지게만 하면 되는데 방법좀 알려주세요.ㅠㅠ
2011.01.18 13:13:29
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the currently selected menu XML resource.
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.mypage_menu, menu);
// Disable the spinner since we've already created the menu and the user
// can no longer pick a different menu XML.
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
Intent intent;
switch (item.getItemId()) {
case문들...
}
return false;
}
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the currently selected menu XML resource.
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.mypage_menu, menu);
// Disable the spinner since we've already created the menu and the user
// can no longer pick a different menu XML.
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
Intent intent;
switch (item.getItemId()) {
case문들...
}
return false;
}



