| | |
| | | import android.os.SystemClock; |
| | | import android.provider.Settings; |
| | | import android.text.TextUtils; |
| | | import android.util.Log; |
| | | import android.view.View; |
| | | import android.widget.TextView; |
| | | |
| | |
| | | |
| | | @Override |
| | | public void onBindView(Bundle savedInstanceState) { |
| | | // setNotificationBarBackgroundColor(CustomColor.blue); |
| | | // setNotificationBarBackgroundColor(CustomColor.white); |
| | | setStatusBarTranslucent(); |
| | | |
| | | //初始化碎片 |
| | | initFragment(savedInstanceState); |
| | | //初始化 |
| | |
| | | this.requestPermissions(); |
| | | //读取消息未读数量 |
| | | this.getUnreadCount(); |
| | | //预创建脚本json文件夹 |
| | | HdlFileLogic.getInstance().createHdlESLocalJsonDirectory(); |
| | | //获取云端脚本 |
| | | HdlESLocalJsonLogic.getInstance().getAllHdlESLocalJson(); |
| | | |
| | |
| | | if (this.currentFragmentIndex == 0) { |
| | | //概览界面 |
| | | viewBinding.myPowerStationBottomIl0.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.home_page_selected)); |
| | | viewBinding.myPowerStationBottomIl0.titleTv.setTextColor(getColor(R.color.text_E6000000)); |
| | | viewBinding.myPowerStationBottomIl0.titleTv.setTextColor(getColor(R.color.text_E6FFFFFF)); |
| | | viewBinding.myPowerStationBottomIl1.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.power_station_unselected)); |
| | | viewBinding.myPowerStationBottomIl1.titleTv.setTextColor(getColor(R.color.text_65000000)); |
| | | viewBinding.myPowerStationBottomIl1.titleTv.setTextColor(getColor(R.color.text_66FFFFFF)); |
| | | viewBinding.myMessageBottomIl2.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.message_unselected)); |
| | | viewBinding.myMessageBottomIl2.titleTv.setTextColor(getColor(R.color.text_65000000)); |
| | | viewBinding.myMessageBottomIl2.titleTv.setTextColor(getColor(R.color.text_66FFFFFF)); |
| | | viewBinding.myMeBottomIl3.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.me_unselected)); |
| | | viewBinding.myMeBottomIl3.titleTv.setTextColor(getColor(R.color.text_65000000)); |
| | | viewBinding.myMeBottomIl3.titleTv.setTextColor(getColor(R.color.text_66FFFFFF)); |
| | | } else if (this.currentFragmentIndex == 1) { |
| | | //电站界面 |
| | | viewBinding.myPowerStationBottomIl0.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.home_page_unselected)); |
| | | viewBinding.myPowerStationBottomIl0.titleTv.setTextColor(getColor(R.color.text_65000000)); |
| | | viewBinding.myPowerStationBottomIl0.titleTv.setTextColor(getColor(R.color.text_66FFFFFF)); |
| | | viewBinding.myPowerStationBottomIl1.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.power_station_selected)); |
| | | viewBinding.myPowerStationBottomIl1.titleTv.setTextColor(getColor(R.color.text_E6000000)); |
| | | viewBinding.myPowerStationBottomIl1.titleTv.setTextColor(getColor(R.color.text_E6FFFFFF)); |
| | | viewBinding.myMessageBottomIl2.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.message_unselected)); |
| | | viewBinding.myMessageBottomIl2.titleTv.setTextColor(getColor(R.color.text_65000000)); |
| | | viewBinding.myMessageBottomIl2.titleTv.setTextColor(getColor(R.color.text_66FFFFFF)); |
| | | viewBinding.myMeBottomIl3.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.me_unselected)); |
| | | viewBinding.myMeBottomIl3.titleTv.setTextColor(getColor(R.color.text_65000000)); |
| | | viewBinding.myMeBottomIl3.titleTv.setTextColor(getColor(R.color.text_66FFFFFF)); |
| | | } else if (this.currentFragmentIndex == 2) { |
| | | //消息界面 |
| | | viewBinding.myPowerStationBottomIl0.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.home_page_unselected)); |
| | | viewBinding.myPowerStationBottomIl0.titleTv.setTextColor(getColor(R.color.text_65000000)); |
| | | viewBinding.myPowerStationBottomIl0.titleTv.setTextColor(getColor(R.color.text_66FFFFFF)); |
| | | viewBinding.myPowerStationBottomIl1.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.power_station_unselected)); |
| | | viewBinding.myPowerStationBottomIl1.titleTv.setTextColor(getColor(R.color.text_65000000)); |
| | | viewBinding.myPowerStationBottomIl1.titleTv.setTextColor(getColor(R.color.text_66FFFFFF)); |
| | | viewBinding.myMessageBottomIl2.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.message_select)); |
| | | viewBinding.myMessageBottomIl2.titleTv.setTextColor(getColor(R.color.text_E6000000)); |
| | | viewBinding.myMessageBottomIl2.titleTv.setTextColor(getColor(R.color.text_E6FFFFFF)); |
| | | viewBinding.myMeBottomIl3.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.me_unselected)); |
| | | viewBinding.myMeBottomIl3.titleTv.setTextColor(getColor(R.color.text_65000000)); |
| | | viewBinding.myMeBottomIl3.titleTv.setTextColor(getColor(R.color.text_66FFFFFF)); |
| | | } else if (this.currentFragmentIndex == 3) { |
| | | //我的界面 |
| | | viewBinding.myPowerStationBottomIl0.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.home_page_unselected)); |
| | | viewBinding.myPowerStationBottomIl0.titleTv.setTextColor(getColor(R.color.text_65000000)); |
| | | viewBinding.myPowerStationBottomIl0.titleTv.setTextColor(getColor(R.color.text_66FFFFFF)); |
| | | viewBinding.myPowerStationBottomIl1.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.power_station_unselected)); |
| | | viewBinding.myPowerStationBottomIl1.titleTv.setTextColor(getColor(R.color.text_65000000)); |
| | | viewBinding.myPowerStationBottomIl1.titleTv.setTextColor(getColor(R.color.text_66FFFFFF)); |
| | | viewBinding.myMessageBottomIl2.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.message_unselected)); |
| | | viewBinding.myMessageBottomIl2.titleTv.setTextColor(getColor(R.color.text_65000000)); |
| | | viewBinding.myMessageBottomIl2.titleTv.setTextColor(getColor(R.color.text_66FFFFFF)); |
| | | viewBinding.myMeBottomIl3.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.me_selected)); |
| | | viewBinding.myMeBottomIl3.titleTv.setTextColor(getColor(R.color.text_E6000000)); |
| | | viewBinding.myMeBottomIl3.titleTv.setTextColor(getColor(R.color.text_E6FFFFFF)); |
| | | } |
| | | } |
| | | |