java - Android studio - how can I save a textView's text as a PNG image (with it's font, color, and font size)? -


this question has answer here:

i researched lot on internet no use. new android programming , java. wrote simple program in android studio lets write text in cool font set, optionally user can chose color , font size. want save text, font, font size, , font color; image viewable galley application. tried lots of things spent hours on universe still against me. managed create bitmap image, , can view in imageview,but can't save storage. can please explain ? im new both android , java.

public boolean saveimagetointernalstorage(bitmap image) {      try {         // use compress method on bitmap object write image         // outputstream         fileoutputstream fos = context.openfileoutput("desiredfilename.png", context.mode_private);          // writing bitmap output stream         image.compress(bitmap.compressformat.png, 100, fos);         fos.close();         return true;     }      catch (exception e) {         log.e("savetointernalstorage()", e.getmessage());         return false;     }   } 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -