Advertisement
Guest User

Untitled

a guest
Mar 15th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. FileOutputStream fos = context.openFileOutput("myimage.png", Context.MODE_PRIVATE);
  2. bitmap.compress(CompressFormat.PNG, 100, fos);
  3. fos.close();
  4.  
  5. File filepath = context.getFileStreamPath("myimage.png");
  6. Uri uri = Uri.parse(filepath.toString());
  7. myImageView.setImageUri(uri);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement