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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:45:41+00:00 2026-06-17T09:45:41+00:00

I have seen two ways to set background for Android App screen. case A::

  • 0

I have seen two ways to set background for Android App screen.

case A:: android:background=”?attr/actionBarItemBackground”

case B:: android:background=”@drawable/ic_launcher_settings”

How do android:background functions in the case A? I searched code, but not able to figure out where “actionBarItemBackground” exists. I understood case B

  • 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-17T09:45:42+00:00Added an answer on June 17, 2026 at 9:45 am

    Case A is a reference to a style attribute. It allows you to reference a particular piece of style information without knowing its actual value. There are a lot of Android-defined attributes that are used to style the Android UI, but you can also define you own attributes.

    actionBarItemBackground is one such attribute. There are two ways you can use this attribute:

    1. You can reference it to make the look and feel of UI elements consistent with action bar items:

      <com.mycompany.MyView
          android:id="@+id/myView"
          android:background="?attr/actionBarItemBackground"/>
      
    2. You can define a theme and set the value of this attribute to override the default L&F for your app:

      <style name="MyTheme" parent="@android:style/Theme">
          <item name="android:actionBarItemBackground">#383c44</item>
      </style>
      

    Here are some pointers to the Android documentation:

    For styles an themes see:
    http://developer.android.com/guide/topics/ui/themes.html.

    For a list of all attributes see:
    http://developer.android.com/reference/android/R.attr.html

    For defining your own attributes there is no documentation. Have a look at one of the attrs.xml files in the SDK (e.g. under platforms\android-17\data\res\values) to see how style attributes are declared. You can declare attributes in the same way by putting an attrs.xml file in your res\values folder. You can then use these attributes in your own styles and themes.

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

Sidebar

Related Questions

I have seen at least two ways: 1)to handle the touch screen events 2)to
I have seen there are two ways to do this: Creating a variable then
I have seen at least two ways to include an external log4net config file
I have seen programs exporting to Excel in two different ways. Opening Excel and
I have seen two different ways of merging local branches. git checkout master git
I have seen that there are two different ways to access methods within a
I have seen resources show two ways of allocating memory while ensuring that there
I have seen two ways of detecting whether a UA implements a specific JS
I have seen function defined two ways in bashrc: dosomething() { ... } and
I've seen JavaScript files formatted two different ways and I have no idea what

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.