SHARE
TWEET

Untitled

a guest Mar 15th, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top