I've developed an application which contains a menu icon in my actionbar, I create the menu as below:
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.main, menu);
return true;
}
and here's the code for the onOptionsItemSelected:
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_home:
startActivity(new Intent(this, MainActivity.class));
return true;
case R.id.menu_adv_search:
startActivity(new Intent(this, AdvSearchActivity.class));
return true;
default:
return super.onOptionsItemSelected(item);
}
}
using my smart phone the menu icon is there (using LG phone), but when I test it on my tablet (Galaxy Tab 8) the menu icon is gone, but the functionality is still there. pressing the menu soft button at the bottom, the popup appears, but the icon is missing from the top action bar. How to fix it? any ideas?