daily pastebin goal
38%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class MainActivity extends Activity {
  2.     @Override
  3.     public void onCreate(Bundle savedInstanceState) {
  4.         super.onCreate(savedInstanceState);
  5.     }
  6.  
  7.     @Override
  8.     public void onResume()
  9.     {
  10.         super.onResume();
  11.         setContentView(createImageView("/sdcard/program-image.jpg"));
  12.     }
  13.  
  14.     @Override
  15.     public void onPause()
  16.     {
  17.         setContentView(createImageView("/sdcard/task-manager-image.jpg"));
  18.         super.onPause();
  19.     }
  20.  
  21.     private ImageView createImageView(String pathFile)
  22.     {
  23.         ImageView imageView = new ImageView(getApplication());
  24.         imageView.setImageBitmap(BitmapFactory.decodeFile(pathFile));
  25.         imageView.invalidate();
  26.         return imageView;
  27.     }
  28. }
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