package com.key.vibekeyboard.Fragment;

import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.key.vibekeyboard.R;
import com.key.vibekeyboard.Utils.SettingUtil;
import com.key.vibekeyboard.databinding.FragmentSettingBinding;

public class SettingFragment extends Fragment {

    private FragmentSettingBinding binding;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        binding = FragmentSettingBinding.inflate(inflater, container, false);

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

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


        return binding.getRoot();
    }

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