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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:50:29+00:00 2026-05-30T16:50:29+00:00

I am using Android native action bar. I would like to add my own

  • 0

I am using Android native action bar. I would like to add my own drawable resource as the background of the action bar. So, I made a theme like following:

res/values/themes.xml :

<style name="Theme.MyStyle" parent="android:style/Theme.Holo.Light">
    <item name="android:background">@drawable/my_bg</item>
</style>

Then, in AndroidManifest.xml file I add this style to my application:

<application
        android:debuggable="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"

        android:theme="@style/Theme.MyStyle"
        >
   <activity ...>
   <activity .../>
   ...

</application>

BUT, the background drawable is applied NOT ONLY to action bar BUT ALSO to all fragments’ content. why?

My 2nd question is, how to customize the overflow icon and the left-most “up” button on action bar??

  • 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-30T16:50:30+00:00Added an answer on May 30, 2026 at 4:50 pm

    try

    <?xml version="1.0" encoding="utf-8"?>
    <resources>
        <!-- the theme applied to the application or activity -->
        <style name="Theme.MyStyle" parent="@android:style/Theme.Holo">
            <item name="android:actionBarStyle">@style/MyActionBar</item>
            <!-- other activity and action bar styles here -->
        </style>
    
        <!-- style for the action bar backgrounds -->
        <style name="MyActionBar" parent="@android:style/Widget.Holo.ActionBar">
            <item name="android:background">@drawable/ab_background</item>
            <item name="android:backgroundStacked">@drawable/ab_background</item>
            <item name="android:backgroundSplit">@drawable/ab_split_background</item>
        </style>
    </resources>
    

    customize the logo using setDisplayUseLogoEnabled(boolean)

    More info

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

Sidebar

Related Questions

I made an android project using eclipse. It looks like: src/ ActivityMain.java lib/ Square.java
When I take pictures using android.hardware.camera and I save them to the following location
i made news applicaion in android using RSS feed and now i want to
I was writing some native code on Android using NDK(jni). I want to turn
I am trying to do some multithreading using the Android Native Development Kit, so
Is it possible to access android native code using javascript in the default android
Hi I'm using this to open up the native android camera application Intent camera
i`m trying to send an email using native email client on android phone. I
i am using android:imeOptions=actionSearch in editText and my question is can i write my
I am using Android SDK 1.6 and developing some simple apps. It seems everytime

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.