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

Text instead of Drawables #12

Open
robisaks opened this issue Feb 23, 2011 · 1 comment
Open

Text instead of Drawables #12

robisaks opened this issue Feb 23, 2011 · 1 comment

Comments

@robisaks
Copy link

I'd like to have text as a button in the action bar, in addition to normal drawables. I did some initial research into doing this by drawing text onto a canvas then converting it to a drawable. It seems as though the action bar is expecting the integer for the drawable resource.

@johannilsson
Copy link
Owner

Oh that is true. Currently it's not possible to do, sorry for the poorly designed api for Action. Guess public int getDrawable(); should have been public Drawable getDrawable(); instead and internally deal with translating resources to drawables.

Changing this would break the api and all users would need to change their code when implementing other actions than IntentActions, but I think it's a reasonable change. I need to think that through and have the users of the action bar feedback on such a change.

Until that I would suggest you to add the text through resources or fork it yourself to be able to do it for now.

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

2 participants