| | |
| | | package com.hdl.photovoltaic.base; |
| | | |
| | | import android.app.Activity; |
| | | import android.content.Context; |
| | | import android.content.Intent; |
| | | import android.os.Bundle; |
| | | import android.view.View; |
| | |
| | | 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; |
| | |
| | | private LoadingDialog loadingDialog; |
| | | protected Activity _mActivity; |
| | | |
| | | |
| | | @Override |
| | | protected void onCreate(@Nullable Bundle savedInstanceState) { |
| | | super.onCreate(savedInstanceState); |
| | | LocalManageUtil.changeAppLanguage("en", this); |
| | | |
| | | _mActivity = this; |
| | | Object content = getContentView(); |
| | | //添加Activity到堆栈 |
| | |
| | | onBindView(savedInstanceState); |
| | | //注册EventBus |
| | | registerEventBus(); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | protected void attachBaseContext(Context newBase) { |
| | | super.attachBaseContext(newBase); |
| | | //app中英文设置 |
| | | LocalManageUtil.changeAppLanguage(UserConfigManage.getInstance().getCurrentAppLanguage(), newBase); |
| | | |
| | | } |
| | | |
| | |
| | | super.onDestroy(); |
| | | //隐藏Loading |
| | | hideLoading(); |
| | | //注销EventBus |
| | | unregisterEventBus(); |
| | | //移除Activity |
| | | AppManagerUtils.getAppManager().removeActivity(this); |
| | | //注销EventBus |
| | | unregisterEventBus(); |
| | | |
| | | } |
| | | |