Convert String text to Bitmap

前端 未结 5 1314
醉酒成梦
醉酒成梦 2020-12-02 13:29

Is it possible to convert string text that is inside an EditText box into a Bitmap? In other words, is there any way to convert string text into a Bitmap that m

5条回答
  •  春和景丽
    2020-12-02 14:22

    For only String I don't know but,

    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()); 
    

提交回复
热议问题