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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:06:55+00:00 2026-05-25T18:06:55+00:00

I am looking at the Honeycomb Gallery sample code ( here ) and I

  • 0

I am looking at the Honeycomb Gallery sample code (here) and I ran across the following code while trying to add action items in my own app:

<item android:id="@+id/camera"
    android:title="Camera"
    android:icon="?attr/menuIconCamera"
    android:showAsAction="ifRoom" />

The ?attr is throwing me for a loop. Can someone please explain what this is doing? How is this related to a drawable? I can’t seem to find any good information on Google. Also is there a listing or gallery of attributes we can use for icons instead of just menuIconCamera?

Thanks

Edit:
I did some more looking around and found that attrs.xml looks like this:

<resources>
<declare-styleable name="AppTheme">
    <attr name="listDragShadowBackground" format="reference" />
    <attr name="menuIconCamera" format="reference" />
    <attr name="menuIconToggle" format="reference" />
    <attr name="menuIconShare" format="reference" />
</declare-styleable>

Unfortunately that just makes it even more confusing for me. What is this doing?

  • 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-25T18:06:56+00:00Added an answer on May 25, 2026 at 6:06 pm

    The ?attr/menuIconCamera value means that an icon from menuIconCamera attribute of the current theme will be used.

    There must be a drawable assigned to the menuIconCamera attribute somewhere in the themes.xml file. If there’re two themes with different values of this attribute then actual icon will depend on a theme which is currently used.

    The attrs.xml file is used to define custom attributes. Without this definition compiler will treat unknown attributes as erroneous.

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

Sidebar

Related Questions

Looking for a code sample, preferably using TADOConnection. I want to save the TPicture
I'm looking to copy the action bar implementation from the gmail app in Honeycomb
Looking for feedback on : http://code.google.com/p/google-perftools/wiki/GooglePerformanceTools
Looking for C# class which wraps calls to do the following: read and write
Looking through the Django docs and trying to figure out the use of the
Looking at the code: int i = 5; if (i = 0) { printf
Looking at the Apple iPhone Core Data Recipes sample app, they store image files
Looking for a scalable, flexible and fast database design for 'Build your own form'
Looking at some old code in Java 1.4 but I'm unfamiliar with Java. Does
Looking to add a PNG Fade at the bottom of the our survey questionnaire

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.