アクションバーの画像の下のように、タイトルの横にメニューアイコンを表示する方法は?
これは私のプログラムの写真ですが、それを行うことは可能ですか? 助けてください〜ありがとう
ここに私のコードがあります
public void openOptionsMenu() {
// TODO Auto-generated method stub
super.openOptionsMenu();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
//call the base class to include system menus
super.onCreateOptionsMenu(menu);
int group1 = 1;
MenuItem bakchome = menu.add(group1,1,1,"Add News");
bakchome.setIcon(R.drawable.ic_menu_add);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()) {
case 1:
ProgressDialog progress1 = new ProgressDialog(News.this);
progress1.setMessage("Loading...please wait..");
progress1.setTitle("Planbiz");
new MyTask(progress1).execute();
Intent intent1 = new Intent(getApplicationContext(), News_Edit.class);
startActivity(intent1);
break;
}
return true;
}
申し訳ありませんが、私は新しいユーザーで、写真をアップロードできません。私の質問をうまく説明できない場合は申し訳ありません。