Question

in my application I have option menu it run with menu button on phone my question is, if my phone has no button how it is work ?

Was it helpful?

Solution

OK. Here is the deal*(Considering you know how to create options menu)*. Sometimes this might become a problem to notify the user that there is some options hidden in the method. So simply you can use any buttons or images or any widgets you have used in your app to open up your options menu. Here is a sample of how it works,

    button.setOnClickListener(new OnClickListener() {

        public void onClick(View v) {
            openOptionsMenu();
        }
    });

Calling the method, openOptionsMenu() I believe will solve your problem.

OTHER TIPS

It's responsibility of your phone to enable the menu somehow. One of the (most popular) ways of doing it is using on-screen soft buttons.

Either ways, thats the responsibility of the phone manufacturer, you can leave it out of your things-to-worry-about.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top