android-actionbar
android-actionbar copied to clipboard
Text instead of Drawables
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.
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 IntentAction
s, 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.