Advertisement
scorpion01

Untitled

Oct 11th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.01 KB | None | 0 0
  1. package com.example.hapus2;
  2.  
  3. import androidx.appcompat.app.AppCompatActivity;
  4.  
  5. import android.content.Intent;
  6. import android.os.Bundle;
  7. import android.os.Handler;
  8. import android.view.animation.Animation;
  9. import android.view.animation.AnimationUtils;
  10. import android.widget.ImageView;
  11.  
  12. public class MainActivity extends AppCompatActivity {
  13.     ImageView imageView;
  14.     Animation animation;
  15.  
  16.     @Override
  17.     protected void onCreate(Bundle savedInstanceState) {
  18.         super.onCreate(savedInstanceState);
  19.         setContentView(R.layout.activity_main);
  20.         imageView = findViewById(R.id.imageView);
  21.         animation = AnimationUtils.loadAnimation(this, R.anim.fadeout);
  22.         imageView.startAnimation(animation);
  23.         new Handler().postDelayed(new Runnable() {
  24.             @Override
  25.             public void run() {
  26.                 Intent intent = new Intent(MainActivity.this, Home.class);
  27.                 startActivity(intent);
  28.                 finish();
  29.             }
  30.         },5000);
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement