package io.rong.imkit.activity;

import android.content.Context;

import androidx.fragment.app.FragmentActivity;

import io.rong.imkit.R;
import io.rong.imkit.utils.StatusBarUtil;
import io.rong.imkit.utils.language.RongConfigurationManager;

public class RongBaseNoActionbarActivity extends FragmentActivity {


    @Override
    protected void attachBaseContext(Context newBase) {
        Context context = RongConfigurationManager.getInstance().getConfigurationContext(newBase);
        super.attachBaseContext(context);
    }


    public void initStatusBar(int colorResId) {
        StatusBarUtil.setRootViewFitsSystemWindows(this, true);
        StatusBarUtil.setStatusBarColor(this, colorResId == 0 ? getResources().getColor(R.color.rc_white_color) : getResources().getColor(colorResId)); //Color.parseColor("#F5F6F9")
        StatusBarUtil.setStatusBarDarkTheme(this, true);
    }
}
