package com.wallpaper.perfectwallpaper.activity;

import android.os.Bundle;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

import com.wallpaper.perfectwallpaper.R;
import com.wallpaper.perfectwallpaper.databinding.ActivitySettingBinding;
import com.wallpaper.perfectwallpaper.utils.SettingUtil;

public class SettingActivity extends AppCompatActivity {

    private ActivitySettingBinding binding;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        binding = ActivitySettingBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());

        initData();
        initEvent();

    }

    private void initData() {

    }

    private void initEvent() {

        binding.back.setOnClickListener(v -> finish());

        binding.version.setText(SettingUtil.getCurrentVersion(this));

        binding.share.setOnClickListener(v -> {
            SettingUtil.shareApp(this);
        });

    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        binding = null;
    }
}