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 6920175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:06:51+00:00 2026-05-27T10:06:51+00:00

Sometimes when doing some so very simple, you miss something big. I must be

  • 0

Sometimes when doing some so very simple, you miss something big. I must be missing something huge because I am getting nowhere fast (and an hour of sifting through the web has revealed nothing).

I want to have a menu with items with checkmarks in group–just like a simple RadioGroup layout. I get the menu, but no checkmarks of any kind.

Here’s the res/menu/options_menu.xml:

 <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" >

    <group android:checkableBehavior="single">
        <item
            android:id="@+id/item1"
            android:title="item1"
        />
        <item
            android:id="@+id/item2"
            android:title="item2"
        />
        <item
            android:id="@+id/item3"
            android:title="item3"
            android:checked="true"
        />
    </group>

</menu>

And of course, here’s the relevant methods in my Activity:

    @Override
public boolean onCreateOptionsMenu(Menu menu) {
    MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.options_menu, menu);
    return true;
}

This is about as simple as I can make it–any ideas on what I’m missing?

  • 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-27T10:06:52+00:00Added an answer on May 27, 2026 at 10:06 am

    Here’s the work-around:

    In your strings.xml file you can embed a unicode checkmark. There are two to choose from. For this project I prefer the friendlier check of \u2714. You then swap a string with the check-mark for a string without it via onPrepareOptionsMenu() as appropriate.

    Here’s the xml code two strings, one with and one without checkmarks:

        <string name="opp_random">unchecked</string>
        <string name="opp_random_check">\u2714 checked</string>
    

    Happy coding!

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

Sidebar

Related Questions

I was doing some operations with arrays, like this (very simple) a = [1,
It seems that I am doing something wrong or the linker is not very
I'm doing some tests using ActivityInstrumentationTestCase2<> class. Sometimes I launch new Activities within my
Sometimes I hear the argument against doing things on client side using javascript. People
Sometimes, when we're doing small changes to our web apps, e.g. bug fixes, we
Sometimes when I see my logging code I wonder if I am doing it
Sometimes I have to write code that alternates between doing things and checking for
Sometimes I need to quickly extract some arbitrary data from XML files to put
Im doing some javascript code and im using firefox. i have a problem which
I'm doing a phone app with some animations and they look really clunky on

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.