amulyakhare / TextDrawable

This light-weight library provides images with letter/text like the Gmail app. It extends the Drawable class thus can be used with existing/custom/network ImageView classes. Also included is a fluent interface for creating drawables and a customizable ColorGenerator.
MIT License
3.16k stars 612 forks source link

How to convert your drawable to an int resource ? #38

Open sekharrockz opened 8 years ago

sekharrockz commented 8 years ago

In android toolbar we use, "SetLogo(int resId)" . In this resId i want to pass the TextDrawable.

ejohansson commented 8 years ago

This is not possible since resource id's are generated compile time.

https://developer.android.com/guide/topics/resources/accessing-resources.html