package com.ads.cal.notes;

import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentActivity;

public abstract class BaseActivity extends FragmentActivity {

    protected static final int init = 0;

    protected static final String EXAM_DATA1 = "EXAM_DATA1";
    protected static final String EXAM_DATA2 = "EXAM_DATA2";
    protected static final String EXAM_DATA3 = "EXAM_DATA3";


    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (init == 0) {
            return;
        }
        if (this instanceof WelcomeActivity) {

        } else {
            getWindow().setStatusBarColor(getColor(R.color.color_6B7077)); // 设置颜色
        }
        setContentView(getContentLayoutId());
        initView();
        intData();
    }

    @Override
    protected void onStart() {
        super.onStart();
    }

    @Override
    protected void onResume() {
        super.onResume();
    }

    @Override
    protected void onPause() {
        super.onPause();
    }

    @Override
    protected void onStop() {
        super.onStop();
    }

    @Override
    protected void onRestart() {
        super.onRestart();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }
    abstract int getContentLayoutId();

    abstract void initView();
    abstract void intData();
}
