You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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.
The text was updated successfully, but these errors were encountered: