0

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;
        }
Jude Fisher
  • 11,138
  • 7
  • 48
  • 91
Rahul Rawat
  • 999
  • 2
  • 17
  • 40

1 Answers1

1

Say Goodbye to the Menu Button

If you’ve already developed an app to support Android 2.3 and lower, then you might have noticed that when it runs on a device without a hardware Menu button (such as a Honeycomb tablet or Galaxy Nexus), the system adds the action overflow button beside the system navigation.

enter image description here

Padma Kumar
  • 19,893
  • 17
  • 73
  • 130