package com.ar.paintar.activity;

import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;

import com.ar.paintar.databinding.ActivitySettingBinding;
import com.ar.paintar.utils.Setting;

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(Setting.getCurrentVersion(this));

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

    }

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