I want to draw some text on image which is in Drawable folder. In my code I am getting drawable in the following way
Drawable drawable = getResources().getDrawable(R.drawable.bubble);
Is there any way to add text through code that is programmatically to this drawable image?
I’m not sure how flexible it is but it is possible to use a TextView and give it a background like so:
or programmatically with setBackgroundResource or setBackgroundDrawable.
Edit:
With an xml layout file like this:
I get a result like this: