wjc
2024-12-09 50f3ca027bdb84d7ffe45b7b1826fefcdc37fab9
app/src/main/java/com/hdl/photovoltaic/ui/me/QrCodeMainActivity.java
@@ -34,8 +34,8 @@
    @Override
    public void onBindView(Bundle savedInstanceState) {
        setNotificationBarBackgroundColor(CustomBaseActivity.CustomColor.white);
        setStatusBarTextColor();
        setStatusBarTranslucent();
        getWindow().setNavigationBarColor(getColor(R.color.text_00000000));
        //初始化
        initView();
        //初始化界面监听器
@@ -49,7 +49,7 @@
    private void initEvent() {
        viewBinding.toolbarTopQrCodeRl.topBackLl.setOnClickListener(new View.OnClickListener() {
        viewBinding.toolbarTopRl.topBackLl.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
@@ -89,11 +89,9 @@
    }
    private void initView() {
        viewBinding.toolbarTopQrCodeRl.topTitleTv.setText(R.string.qr_code_business_card);
        viewBinding.toolbarTopQrCodeRl.topBackLl.setVisibility(View.VISIBLE);
        viewBinding.toolbarTopQrCodeRl.topLeftIv.setImageResource(R.drawable.back_c);
        viewBinding.toolbarTopQrCodeRl.topTitleTv.setTextColor(getResources().getColor(R.color.text_030D1C, null));
        viewBinding.toolbarTopQrCodeRl.topBarView.setBackgroundColor(getResources().getColor(R.color.text_FFECECEC, null));
        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())) {
@@ -105,13 +103,13 @@
            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 = new Gson().toJson(qrCodeBean);
        Bitmap bitmap = HdlCommonLogic.getInstance().createQRCodeBitmap(content, 229, 229, "UTF-8", "H", "1", 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().getAccount();// new Gson().toJson(qrCodeBean);内容过长微信扫码显示有问题
        Bitmap bitmap = HdlCommonLogic.getInstance().createQRCodeBitmap(content, 168, 168, "UTF-8", "H", "0", getColor(R.color.text_00000000), Color.WHITE);
        viewBinding.qrCodeIv.setImageBitmap(bitmap);
    }