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

  • SEARCH
  • Home
  • 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 7990157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:55:34+00:00 2026-06-04T12:55:34+00:00

I currently am programming for API 10 and above. I created a menu and

  • 0

I currently am programming for API 10 and above. I created a menu and was looking to implement the method Menu.setGroupCheckable(id, checkable, exclusive). Below is my code. From the documentation I was expecting a check mark over the selected item out of the group and the other ones to be disabled. However, this is not the case.

 @Override
public boolean onCreateOptionsMenu(Menu menu) {
     super.onCreateOptionsMenu(menu);
     menu.add(0, 1, 0, "I1").setIcon(R.drawable.ic_launcher);
     menu.add(0, 2, 1, "I2");
     menu.add(0,3,2,"I3");

     menu.add(1, 4, 3, "I4");
     menu.add(1, 5, 4, "I5");
     menu.add(1,6,5,"I6");

    menu.setGroupCheckable(1, true, true);

     return true;
}

Android documentation link: http://developer.android.com/reference/android/view/Menu.html

  • 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-06-04T12:55:36+00:00Added an answer on June 4, 2026 at 12:55 pm

    Android Menu: Two single-checkable groups in the same menu

    http://www.brighthub.com/mobile/google-android/articles/28673.aspx

    http://www.mysamplecode.com/2011/07/android-options-menu-submenu-group.html

    http://www.itcsolutions.eu/2011/09/26/android-tutorial-how-to-add-a-menu-programmatic-vs-declarative-solution/

    These links may help you!!!

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

Sidebar

Related Questions

I am currently learning F# and functional programming in general (from a C# background)
I'm currently new into client-side programming, especially using the Jquery Ajax method to call
I'm currently programming in C with win32 API. I would like to know how
I am currently programming a graphics application with OpenGL and the Windows API in
I'm currently programming very simple game for Android (API level 7) to discover and
I'm currently translating an API from C# to Java which has a network component.
I'm currently programming an interface between some C++ code and Java using JNI. I'm
I'm currently learning Windows programming through the Win32 API using Petzold's book as a
I am currently programming a tool (in ANSI C) for my company which reads
I'm currently programming a client application and I'm wondering whether I should use the

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.