package com.swiftcleaner.chovey.view;

import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;
import androidx.viewbinding.ViewBinding;

import com.swiftcleaner.chovey.view.dialog.AppExitDialog;

import io.reactivex.rxjava3.annotations.Nullable;

/**
 * 作者：马海钊
 * 时间：2025/1/2 11:54
 * 功能：
 */
public abstract class BaseActivity<VB extends ViewBinding> extends AppCompatActivity {
    protected VB binding;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = getViewBinding();
        setContentView(binding.getRoot());
        initView();
        initData();
    }

    protected abstract VB getViewBinding();

    protected abstract void initView();
    protected abstract void initData();
}

