Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Convert String of EditText into Bitmap?

I wanted to convert string of EditText to Bitmap. have a string like this

String str=edtext.getText().toString(); 

How can i convert that string to bitmap?

like image 433
Ashish Augustine Avatar asked Feb 02 '26 23:02

Ashish Augustine


1 Answers

I dont know about how to make image of that string but here is code to make Bitmap from and EditText

So you will get Bitmap image of the whole EditText not only String with this,

mEditText.setCursorVisible(false);
mEditText.buildDrawingCache();
Bitmap bmp = Bitmap.createBitmap(mEditText.getDrawingCache());
like image 51
MKJParekh Avatar answered Feb 04 '26 11:02

MKJParekh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!