| | |
| | | @Override |
| | | public void onBindView(Bundle savedInstanceState) { |
| | | setStatusBarTranslucent(); |
| | | getWindow().setNavigationBarColor(getColor(R.color.text_00000000)); |
| | | //初始化 |
| | | initView(); |
| | | //初始化界面监听器 |
| | |
| | | |
| | | |
| | | private void initEvent() { |
| | | viewBinding.topBackLl.setOnClickListener(new View.OnClickListener() { |
| | | viewBinding.toolbarTopRl.topBackLl.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | finish(); |
| | |
| | | } |
| | | |
| | | private void initView() { |
| | | viewBinding.topTitleTv.setText(R.string.qr_code_business_card); |
| | | viewBinding.topBackLl.setVisibility(View.VISIBLE); |
| | | viewBinding.toolbarTopRl.topBarView.setBackgroundColor(getColor(R.color.text_00000000)); |
| | | viewBinding.toolbarTopRl.topTitleTv.setText(R.string.qr_code_business_card); |
| | | viewBinding.toolbarTopRl.topBackLl.setVisibility(View.VISIBLE); |
| | | // viewBinding.toolbarTopQrCodeRl.topMoreBtn.setVisibility(View.VISIBLE); |
| | | // viewBinding.toolbarTopQrCodeRl.topMoreIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.save_image)); |
| | | if (!TextUtils.isEmpty(UserConfigManage.getInstance().getUserName())) { |
| | |
| | | viewBinding.userAccountTv.setVisibility(View.VISIBLE); |
| | | viewBinding.userAccountTv.setText(str); |
| | | } |
| | | // QrCodeBean qrCodeBean = new QrCodeBean(); |
| | | // qrCodeBean.setUserEmail(UserConfigManage.getInstance().getBingEmail()); |
| | | // qrCodeBean.setUserPhone(UserConfigManage.getInstance().getBingPhone()); |
| | | // qrCodeBean.setUserName(UserConfigManage.getInstance().getUserName()); |
| | | // qrCodeBean.setAccount(UserConfigManage.getInstance().getAccount()); |
| | | String content = UserConfigManage.getInstance().getAccount();// new Gson().toJson(qrCodeBean);内容过长微信扫码显示有问题 |
| | | Bitmap bitmap = HdlCommonLogic.getInstance().createQRCodeBitmap(content, 168, 168, "UTF-8", "H", "0", Color.BLACK, Color.WHITE); |
| | | QrCodeBean qrCodeBean = new QrCodeBean(); |
| | | qrCodeBean.setUserEmail(UserConfigManage.getInstance().getBingEmail()); |
| | | qrCodeBean.setUserPhone(UserConfigManage.getInstance().getBingPhone()); |
| | | qrCodeBean.setUserName(UserConfigManage.getInstance().getUserName()); |
| | | qrCodeBean.setAccount(UserConfigManage.getInstance().getAccount()); |
| | | // String content = UserConfigManage.getInstance().getBingEmail() + ";" + UserConfigManage.getInstance().getBingPhone() + ";" + UserConfigManage.getInstance().getUserName() + ";" + UserConfigManage.getInstance().getAccount(); |
| | | // String content = UserConfigManage.getInstance().getAccount();// |
| | | String content = new Gson().toJson(qrCodeBean);//内容过长微信扫码显示有问题 |
| | | Bitmap bitmap = HdlCommonLogic.getInstance().createQRCodeBitmap(content, 168, 168, "UTF-8", "H", "1", Color.BLACK, Color.WHITE); |
| | | viewBinding.qrCodeIv.setImageBitmap(bitmap); |
| | | |
| | | } |