| | |
| | | |
| | | @Override |
| | | public void onBindView(Bundle savedInstanceState) { |
| | | setNotificationBarBackgroundColor(CustomColor.white); |
| | | setStatusBarTextColor(); |
| | | setStatusBarTranslucent(); |
| | | getWindow().setNavigationBarColor(getColor(R.color.text_FF000000)); |
| | | //初始化 |
| | | initView(); |
| | | //初始化界面监听器 |
| | |
| | | * 初始化界面监听器 |
| | | */ |
| | | private void initEvent() { |
| | | viewBinding.toolbarTopFragmentHouseListRl.topBackLl.setOnClickListener(new View.OnClickListener() { |
| | | viewBinding.toolbarTopRl.topBackLl.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | finish(); |
| | |
| | | * 初始化 |
| | | */ |
| | | private void initView() { |
| | | viewBinding.toolbarTopFragmentHouseListRl.topBarView.setBackgroundColor(getResources().getColor(R.color.text_FFFFFFFF, null)); |
| | | viewBinding.toolbarTopFragmentHouseListRl.topTitleTv.setText(R.string.home_login_change_password); |
| | | viewBinding.toolbarTopFragmentHouseListRl.topTitleTv.setTextColor(getResources().getColor(R.color.text_030D1C, null)); |
| | | viewBinding.toolbarTopFragmentHouseListRl.topBackLl.setVisibility(View.VISIBLE); |
| | | viewBinding.toolbarTopFragmentHouseListRl.topLeftIv.setImageResource(R.drawable.back_c); |
| | | viewBinding.toolbarTopRl.topTitleTv.setText(R.string.home_login_change_password); |
| | | viewBinding.toolbarTopRl.topBackLl.setVisibility(View.VISIBLE); |
| | | viewBinding.meChangePasswordOldIc.mePswTitleTv.setText(R.string.home_login_old_pws); |
| | | viewBinding.meChangePasswordOldIc.mePswEt.setHint(R.string.home_login_input_old_pws); |
| | | viewBinding.meChangePasswordOldIc.lineV.setVisibility(View.GONE); |
| | |
| | | String newPsw = viewBinding.meChangePasswordNewIc.mePswEt.getText().toString(); |
| | | String affirmPsw = viewBinding.meChangePasswordAffirmIc.mePswEt.getText().toString(); |
| | | boolean isEnabled = oldPsw.length() > 0 && newPsw.length() > 0 && affirmPsw.length() > 0; |
| | | if (isEnabled) { |
| | | viewBinding.homeAffirmTv.setTextColor(getColor(R.color.text_E6FFFFFF)); |
| | | } else { |
| | | viewBinding.homeAffirmTv.setTextColor(getColor(R.color.text_66FFFFFF)); |
| | | } |
| | | viewBinding.homeAffirmTv.setEnabled(isEnabled); |
| | | } |
| | | |
| | |
| | | */ |
| | | private boolean isEditTextPassword(String oldPsw, String newPsw, String affirmPsw) { |
| | | if (newPsw.length() < 6 || affirmPsw.length() < 6) { |
| | | HdlThreadLogic.tipFlashingBox(_mActivity, true, getString(R.string.home_login_least6), -1); |
| | | HdlThreadLogic.tipFlashingBox(_mActivity, false, getString(R.string.home_login_least6), -1); |
| | | return false; |
| | | } |
| | | if (!newPsw.equals(affirmPsw)) { |
| | | //新密码和确认密码不一样 |
| | | HdlThreadLogic.tipFlashingBox(_mActivity, true, getString(R.string.home_login_input_unlike_psw), -1); |
| | | HdlThreadLogic.tipFlashingBox(_mActivity, false, getString(R.string.home_login_input_unlike_psw), -1); |
| | | return false; |
| | | } |
| | | if (oldPsw.equals(newPsw)) { |
| | | HdlThreadLogic.tipFlashingBox(_mActivity, true, getString(R.string.home_old_password_not_new_password), -1); |
| | | HdlThreadLogic.tipFlashingBox(_mActivity, false, getString(R.string.home_old_password_not_new_password), -1); |
| | | return false; |
| | | } |
| | | return true; |