From 819940c20dfb8a0c797b3423a3c0a0c67c9fd955 Mon Sep 17 00:00:00 2001
From: hxb <hxb@hdlchina.com.cn>
Date: 星期五, 27 十二月 2024 18:06:23 +0800
Subject: [PATCH] 处理后台运行被释放的问题

---
 app/src/main/java/com/hdl/photovoltaic/ui/me/QrCodeMainActivity.java |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/me/QrCodeMainActivity.java b/app/src/main/java/com/hdl/photovoltaic/ui/me/QrCodeMainActivity.java
index 78d99cb..25130eb 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/me/QrCodeMainActivity.java
+++ b/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,17 +49,17 @@
 
 
     private void initEvent() {
-        viewBinding.toolbarTopQrCodeRl.topBackLl.setOnClickListener(new View.OnClickListener() {
+        viewBinding.toolbarTopRl.topBackLl.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
                 finish();
             }
         });
 
-        viewBinding.toolbarTopQrCodeRl.topMoreBtn.setOnClickListener(new View.OnClickListener() {
+        viewBinding.saveTv.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                // 鍋囪浣犲凡缁忔湁浜嗕竴涓簩缁寸爜鍥剧墖锛岃繖閲屾槸涓�涓畝鍖栫殑鎴浘鏂规硶
+                //鍋囪浣犲凡缁忔湁浜嗕竴涓簩缁寸爜鍥剧墖锛岃繖閲屾槸涓�涓畝鍖栫殑鎴浘鏂规硶
                 viewBinding.qrCodeIv.setDrawingCacheEnabled(true);
                 Bitmap bitmap = viewBinding.qrCodeIv.getDrawingCache();
                 // 淇濆瓨鎴浘鍒扮浉鍐�
@@ -89,13 +89,11 @@
     }
 
     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_FFFFFFFF, null));
-        viewBinding.toolbarTopQrCodeRl.topMoreBtn.setVisibility(View.VISIBLE);
-        viewBinding.toolbarTopQrCodeRl.topMoreIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.save_image));
+        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.userNameTv.setVisibility(View.VISIBLE);
             viewBinding.userNameTv.setText(UserConfigManage.getInstance().getUserName());
@@ -110,8 +108,10 @@
         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);
+        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);
 
     }

--
Gitblit v1.8.0