package com.ar.arsketch.activity;

import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;

import com.ar.arsketch.databinding.ActivitySettingBinding;
import com.ar.arsketch.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;
    }
}