Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.hapus2;
- import androidx.appcompat.app.AppCompatActivity;
- import android.content.Intent;
- import android.os.Bundle;
- import android.os.Handler;
- import android.view.animation.Animation;
- import android.view.animation.AnimationUtils;
- import android.widget.ImageView;
- public class MainActivity extends AppCompatActivity {
- ImageView imageView;
- Animation animation;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- imageView = findViewById(R.id.imageView);
- animation = AnimationUtils.loadAnimation(this, R.anim.fadeout);
- imageView.startAnimation(animation);
- new Handler().postDelayed(new Runnable() {
- @Override
- public void run() {
- Intent intent = new Intent(MainActivity.this, Home.class);
- startActivity(intent);
- finish();
- }
- },5000);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement