package com.lc.myapplication.security.mysoundstwo.activity;

import android.content.Intent;
import android.os.Bundle;
import android.os.CountDownTimer;

import androidx.appcompat.app.AppCompatActivity;

import com.lc.myapplication.security.mysoundstwo.R;

public class IntoActivity extends AppCompatActivity {
    private CountDownTimer timer;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_into);
        timer = new CountDownTimer(1000,500) {
            @Override
            public void onTick(long millisUntilFinished) {

            }

            @Override
            public void onFinish() {
                startActivity(new Intent(IntoActivity.this, MainActivity.class));
                finish();
            }
        };
        gotostart();
    }

    private void gotostart() {
        timer.start();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        timer.cancel();;
    }
}