ben
ben

Reputation: 393

text to image conversion

i just succeeded in calling a line of text from a text file in th sdcard and got it to display the text out on the application via textview,

is there anyway where i could read the characters from the text and then get it to display a image below the character

like an text to image conversion right below each line of text

the text are short and simple words

thanks in advance

Upvotes: 0

Views: 1575

Answers (1)

Christian Resma Helle
Christian Resma Helle

Reputation: 746

You can create a bitmap manually and draw text into it using the Paint and Canvas classes

Something like this:

Bitmap bitmap = Bitmap.createBitmap(30, 30, Bitmap.Config.ARGB_8888);
Paint paint = new Paint();
Canvas canvas = new Canvas(bitmap);
canvas.drawText("TEXT", 0, 0, paint);

Upvotes: 1

Related Questions