Generating Card

To generate layout into image you can call the Class SaveLayoutAsImage.java

  SaveLayoutAsImage saveImage = new SaveLayoutAsImage(MainActivity.this);
  saveImage.generateImage(lyt_card, tv_author.getText().toString());

by sending the Context to constructor

  SaveLayoutAsImage(Your context here);

send the LinearLayout and title image to method generateImage

  generateImage(Your LinearLayout, Your Image Title);

if you would to change the target folder you can edit in MainActivity.java

  FOLDER_NAME="Quotes";

Last updated