This morning I came across a problem in the Android OS. I have just created an image show application. My application has some functions in a menu in which there are two buttons. The first is a home button and the second is a bookmark button.
When i run my app in an android phone, it works OK and I can easily find the menu buttons, but when I run it on a Galaxy Tab, I am unable to find the menu buttons.
How can I get my menu buttons working in Galaxy Tab?
Here is my code:
@Override
public boolean onOptionsItemSelected(MenuItem item)
{
switch (item.getItemId())
{
case R.id.menu_bookmark:
db.updateContact(new Contact(itemN,imageStatus));
return true;
case R.id.home_page:
Intent i = new Intent(imageTouchs.this, Comics.class);
startActivity(i);
return true;
default:
return super.onOptionsItemSelected(item);
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu)
{
MenuInflater menuInflater = getMenuInflater();
menuInflater.inflate(R.layout.menu, menu);
return true;
}