package com.example.cloudmusic.activity;

import android.content.Intent;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;

import androidx.appcompat.app.AppCompatActivity;

import com.example.cloudmusic.R;

public class WelcomeActivity extends AppCompatActivity {

    private int second;
    private Button tv_skip;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_welcome);
        tv_skip = findViewById(R.id.tv_skip);

        new CountDownTimer(4000,1000) {
            @Override
            public void onTick(long l) {
            }
            @Override
            public void onFinish() {
                LinearLayout view = findViewById(R.id.back);
                view.setBackgroundResource(R.mipmap.second_welcome_page);
                findViewById(R.id.shit).setVisibility(View.VISIBLE);
            }
        }.start();


        tv_skip.setOnClickListener(view -> {
            startActivity(new Intent(WelcomeActivity.this,FristActivity.class));
            finish();
        });
        new CountDownTimer(4000,1000) {
            @Override
            public void onTick(long l) {

            }

            @Override
            public void onFinish() {
                startActivity(new Intent(WelcomeActivity.this,FristActivity.class));
                finish();
            }
        }.start();
    }
}