| | |
| | | |
| | | |
| | | import androidx.activity.result.ActivityResultLauncher; |
| | | import androidx.annotation.Nullable; |
| | | import androidx.appcompat.content.res.AppCompatResources; |
| | | |
| | | |
| | |
| | | changedNickname(); |
| | | } |
| | | }); |
| | | viewBinding.personalDataPhoneIl.getRoot().setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | Intent intent = new Intent(); |
| | | intent.setClass(_mActivity, BindPhoneActivity.class); |
| | | startActivityForResult(intent, 20); |
| | | } |
| | | }); |
| | | viewBinding.personalDataMailIl.getRoot().setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | Intent intent = new Intent(); |
| | | intent.setClass(_mActivity, BindMailActivity.class); |
| | | startActivityForResult(intent, 20); |
| | | } |
| | | }); |
| | | viewBinding.personalDataQrCodeIl.getRoot().setOnClickListener(new View.OnClickListener() { |
| | | |
| | | @Override |
| | |
| | | viewBinding.toolbarTopFragmentMeRl.topBarView.setBackgroundColor(getResources().getColor(R.color.text_FFFFFFFF, null)); |
| | | viewBinding.personalDataUserPortraitIl.sllLlRlNameTv.setText(R.string.me_personal_data_portrait); |
| | | viewBinding.personalDataUserNameIl.sllLlRlNameTv.setText(R.string.me_personal_data_user_name); |
| | | viewBinding.personalDataMailIl.sllLlRlNameTv.setText(R.string.home_login_email); |
| | | viewBinding.personalDataPhoneIl.sllLlRlNameTv.setText(R.string.home_login_phone); |
| | | viewBinding.personalDataQrCodeIl.sllLlRlNameTv.setText(R.string.qr_code_business_card); |
| | | viewBinding.personalDataUserPortraitIl.sllLlRlRightContentIv.setVisibility(View.VISIBLE); |
| | | viewBinding.personalDataUserNameIl.sllLlRlRightContentTv.setVisibility(View.VISIBLE); |
| | | viewBinding.personalDataMailIl.sllLlRlRightContentTv.setVisibility(View.VISIBLE); |
| | | viewBinding.personalDataPhoneIl.sllLlRlRightContentTv.setVisibility(View.VISIBLE); |
| | | viewBinding.personalDataQrCodeIl.sllLlRlRightContentIv.setVisibility(View.VISIBLE); |
| | | viewBinding.personalDataUserNameIl.sllLlRlRightContentTv.setText(UserConfigManage.getInstance().getUserName()); |
| | | viewBinding.personalDataQrCodeIl.sllLlRlRightContentIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.qr_code)); |
| | | setMemberHeadIcon(); |
| | | updateStyle(); |
| | | } |
| | | |
| | | |
| | |
| | | default: |
| | | break; |
| | | } |
| | | } else if (requestCode == 20 && resultCode == 20) { |
| | | updateStyle(); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 刷新绑定手机号和邮箱 |
| | | */ |
| | | private void updateStyle() { |
| | | if (!TextUtils.isEmpty(UserConfigManage.getInstance().getBingPhone())) { |
| | | viewBinding.personalDataPhoneIl.sllLlRlRightContentTv.setText(UserConfigManage.getInstance().getBingPhone()); |
| | | } |
| | | if (!TextUtils.isEmpty(UserConfigManage.getInstance().getBingEmail())) { |
| | | viewBinding.personalDataMailIl.sllLlRlRightContentTv.setText(UserConfigManage.getInstance().getBingEmail()); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |