wjc
2025-03-03 2225b1f0727fb74e10ac5692e68e4cd48f4f62d7
app/src/main/java/com/hdl/photovoltaic/base/BaseActivity.java
@@ -3,13 +3,16 @@
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import com.hdl.photovoltaic.R;
import com.hdl.photovoltaic.config.UserConfigManage;
import com.hdl.photovoltaic.listener.BaseView;
import com.hdl.photovoltaic.other.HdlThreadLogic;
import com.hdl.photovoltaic.utils.AppManagerUtils;
@@ -51,9 +54,10 @@
    @Override
    protected void attachBaseContext(Context newBase) {
        //app中英文设置
        LocalManageUtil.changeAppLanguage(UserConfigManage.getInstance().getCurrentAppLanguage(), newBase);
        super.attachBaseContext(newBase);
//        //app中英文设置
//        LocalManageUtil.changeAppLanguage("en", newBase);
    }
@@ -106,10 +110,10 @@
        super.onDestroy();
        //隐藏Loading
        hideLoading();
        //注销EventBus
        unregisterEventBus();
        //移除Activity
        AppManagerUtils.getAppManager().removeActivity(this);
        //注销EventBus
        unregisterEventBus();
    }
@@ -169,6 +173,7 @@
    public int dip2px(float dpValue) {
        final float scale = getResources().getDisplayMetrics().density;
        return (int) (dpValue * scale + 0.5f);
    }
    /**