johannilsson / android-actionbar

DEPRECATED Android Action Bar Implementation
1.31k stars 564 forks source link

Styleable Background Fix #9

Closed ohhorob closed 13 years ago

ohhorob commented 13 years ago

Hi Johan,

This fixes a problem where your gradient background covers the styled ActionBar background.

Not sure if you'd prefer to fix it a different way, but this works for me.

Rob.

johannilsson commented 13 years ago

Thank you. Are you saying that the background does not need to be set here at all?

ohhorob commented 13 years ago

Actually, yes!

Unsetting the background will let the ActionBar style background show. I set it to transparent without remembering that it could just be unspecified.

johannilsson commented 13 years ago

Great finding, doesn't really make sense to declare the background twice. I removed the background attribute instead, did not notice any difference in the few apps that I use the action bar in.

senagbe commented 13 years ago

Has this been integrated back in? I am still getting the issue where my gradient is beign overwritten by the old gradient.

I am setting the gradient in code.

actionBar.setTitle(intelCategories[getDashboardPosition()].title); ActionBar.IntentAction homeIntentAction = new ActionBar.IntentAction(this, DashboardActivity.createIntent(this), R.drawable.actionbar_home); actionBar.setHomeAction(homeIntentAction); actionBar.setBackgroundResource(intelCategories[getDashboardPosition()].gradient);

johannilsson commented 13 years ago

Hi @senagbe,

These are not related. The action bar currently doesn't support overriding the style programmatically.

To accomplish this I believe we need to add the ability to set a custom layout for both action bar items and for the action bar it self. This is quite a large refactoring but something I believe is worth the effort to be able to do more custom implementations.

I've opened a new issue for this.

senagbe commented 13 years ago

Cheers,

So how much would you want to do this right now :)

S


Sena Gbeckor-Kove

CTO/Founder - imKon

UK : +44 7788 146652 sena@imkon.com | www.imkon.com

Asia (Singapore) : 35 Selegie Road, #09-14/15 Parklane Shopping Mall, 188307 Singapore, Singapore

Europe (London) : 145-157 St John's St, EC1V 4PY London, UK

On Tuesday, 29 March 2011 at 18:22, johannilsson wrote: Hi @senagbe,

These are not related. The action bar currently doesn't support overriding the style programmatically.

To accomplish this I believe we need to add the ability to set a custom layout for both action bar items and for the action bar it self. This is quite a large refactoring but something I believe is worth the effort to be able to do more custom implementations.

I've opened a new issue for this.

Reply to this email directly or view it on GitHub: https://github.com/johannilsson/android-actionbar/pull/9#issuecomment-932029

johannilsson commented 13 years ago

@senagbe I think this will be essential to be able to provide a more reusable widget, but I can't or do not dare to promise when it will be available. Let's continue the discussion in the issue linked above.