Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.42 KB | None | 0 0
  1. public void onClick(View v) {
  2.     new Thread(new Runnable() {
  3.         public void run() {
  4.             // a potentially  time consuming task
  5.             final Bitmap bitmap =
  6.                     processBitMap("image.png");
  7.             mImageView.post(new Runnable() {
  8.                 public void run() {
  9.                     mImageView.setImageBitmap(bitmap);
  10.                 }
  11.             });
  12.         }
  13.     }).start();
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement