Skip to content

Instantly share code, notes, and snippets.

@davidelp68
Created August 30, 2020 15:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidelp68/25bff8de8e872324db4354eb83356353 to your computer and use it in GitHub Desktop.
Save davidelp68/25bff8de8e872324db4354eb83356353 to your computer and use it in GitHub Desktop.
Android Studio - Take Screenshot
//chiamata dell'object Screenshot
val b: Bitmap = Screenshot.takescreenshotOfRootView(imageview)
imageView!!.setImageBitmap(b)
//questa riga serve per far vedere bene l'immagine acquisita
mainL!!.setBackgroundColor(Color.parseColor("#999999"))
//*****************************************************
//chiamata alla funzione saveScreenshot con passaggio immagine creata
saveScreenshot(b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment