Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change ActionBar items Background.? #71

Open
mahaveer opened this issue Sep 5, 2012 · 3 comments
Open

How to change ActionBar items Background.? #71

mahaveer opened this issue Sep 5, 2012 · 3 comments

Comments

@mahaveer
Copy link

mahaveer commented Sep 5, 2012

Hello Johannilsson,
The Library you provided is a very nice.
I have one issue with it , is,
I am Providing one image for the background of Actionbar,
Now when i am assigning Actionbar items to it , I am assigning it tranceperent images.
But a blur white background is gets generated behind those images.
is there any way to remove that white background from Actionbar items?
please help me to sort out . I had wasted almost 3-4 days on it.
you can mail me on [email protected]
Thanks .
Mahaveer

@johannilsson
Copy link
Owner

Hi,

The styles of the AB is located in styles.xml. My guess is that the white color origins from the background which you have to remove. The borders around the items is made up of a margin trick that makes the background shine through to create a border effect. It's not pretty but works for most cases. Removing the margins and replacing all backgrounds including the drawables for action items might give the effect you're after.

Hope this helps.

@mahaveer
Copy link
Author

mahaveer commented Sep 5, 2012

Hi Johannilsson,

Thanks for a quick reply.

I had changed the themes already. but its not giving me the effect.
When i use a image for the background of AB and try to add images to
actions it shows white background for images.
For your convenience i am sending you some images and screen shots of AB
after replacing the BG.

In above images topbar is the image which i am using for the BG of AB.
and others are transparent images. (AB Items).
I had attached a Screen Shot of my Activity.
You can see the white BG on these transparent images which i don't need.

Please help me to sort this issue.
Thanks.

On Wed, Sep 5, 2012 at 12:17 PM, Johan Nilsson [email protected]:

Hi,

The styles of the AB is located in styles.xml. My guess is that the white
color origins from the background which you have to remove. The borders
around the items is made up of a margin trick that makes the background
shine through to create a border effect. It's not pretty but works for most
cases. Removing the margins and replacing all backgrounds including the
drawables for action items might give the effect you're after.

Hope this helps.


Reply to this email directly or view it on GitHubhttps://github.com//issues/71#issuecomment-8289149.

Thanks and Regards.

Mahaveer A Muttha.
Senior Software Engineer.
TechHighWaySystems.
mahaveerm@[email protected]
skype id - mahaveer.muttha
09209205953/9960887653.

@GuyWhoCodez
Copy link

lol this is the second issue I am solving in nearly a few hours...

If you are getting a color behind your background (most likely red), then to change the color just do something like this in the addAction function in the ActionBar.java file.

mActionsView.setBackgroundColor(Color.TRANSPARENT);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants