Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3361344
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T03:08:29+00:00 2026-05-18T03:08:29+00:00

I have an Options menu up and running in my Android application and I’ve

  • 0

I have an Options menu up and running in my Android application and I’ve overridden the onCreateOptionsMenu, onOptionsItemSelected and onPrepareOptionsMenu methods to customize the menu a little.

My question is related to keeping the Options menu open after the user clicks on a menu item. Basically, I’d like to be able to hide the menu until the user clicks on the device menu key. Once the user clicks on this key, I’d like to be able to hold the menu in place regardless of how many times the user clicks on menu items. If the user wants to hide the Options menu, they’d just need to click on the device menu key again.

Is this type of interaction supported (or even advisable). If this interaction is not supported, any alternative suggestions are more than welcome.

Cheers!

Sean

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T03:08:29+00:00Added an answer on May 18, 2026 at 3:08 am

    This will not be possible with onCreateOptionsMenu and the other methods. They always act that way.

    But you can do it another way. But there you have to program the whole menu yourself. Basically add the Menu in your layout.xml and let it be hidden (visibility = gone). Then you overwrite the methods onKeyDown. There you check if it is the Menu key. if the menu is not yet open yes, then you show the menu. If it is open already, you hide it.

    should not be too difficult. Good thing as well is, that you can make the menu look exactly the way you want and as well let it react the way you want.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do I change the options menu at run-time in android 2.3.3? I have
I have been researching options for printing report-like data via a web application. Some
I have a PHP application that displays a list of options to a user.
I have setup my site with 5 pages which are my menu options. When
Sharing an Options Menu between Activity and MapActivity. Is this possible? I have an
I am attempting to update my android application to look better for tablets running
I have the following menu layout in my Android app: <?xml version=1.0 encoding=utf-8?> <menu
I am running Eclipse 3.6. I used to have two options in the context
I have an options menu, but don't want it to appear when the screen
I want to have the context menu of links provide me an option to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.