From 29d30f3831debb971733cc28b1eed9a01ae8a299 Mon Sep 17 00:00:00 2001 From: ZhanGSKen Date: Wed, 10 Dec 2025 17:42:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=9B=BE=E7=89=87=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E9=80=9F=E5=BA=A6=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- powerbell/build.properties | 4 ++-- .../powerbell/views/BackgroundView.java | 21 ++++++++++--------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/powerbell/build.properties b/powerbell/build.properties index c75bcd7..37d4d9b 100644 --- a/powerbell/build.properties +++ b/powerbell/build.properties @@ -1,8 +1,8 @@ #Created by .winboll/winboll_app_build.gradle -#Wed Dec 10 16:54:47 HKT 2025 +#Wed Dec 10 09:40:46 GMT 2025 stageCount=5 libraryProject= baseVersion=15.12 publishVersion=15.12.4 -buildCount=0 +buildCount=7 baseBetaVersion=15.12.5 diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/views/BackgroundView.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/views/BackgroundView.java index e7717bf..76ab98e 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/views/BackgroundView.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/views/BackgroundView.java @@ -55,8 +55,8 @@ public class BackgroundView extends RelativeLayout { LogUtils.d(TAG, "=== initView 启动 ==="); // 1. 配置当前控件:全屏+透明 setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); - setBackgroundColor(0x00000000); - setBackground(new ColorDrawable(0x00000000)); + //setBackgroundColor(0x00000000); + //setBackground(new ColorDrawable(0x00000000)); // 2. 初始化主容器LinearLayout initLinearLayout(); @@ -64,8 +64,9 @@ public class BackgroundView extends RelativeLayout { // 3. 初始化ImageView initImageView(); - // 4. 初始设置透明背景 + // 初始设置透明背景 setDefaultTransparentBackground(); + LogUtils.d(TAG, "=== initView 完成 ==="); } @@ -101,11 +102,11 @@ public class BackgroundView extends RelativeLayout { } public void loadBackgroundBean(BackgroundBean bean) { - if(!bean.isUseBackgroundFile()) { + if (!bean.isUseBackgroundFile()) { setDefaultTransparentBackground(); return; } - if(bean.isUseBackgroundScaledCompressFile()) { + if (bean.isUseBackgroundScaledCompressFile()) { loadImage(bean.getBackgroundScaledCompressFilePath()); } else { @@ -199,9 +200,9 @@ public class BackgroundView extends RelativeLayout { * 调整ImageView尺寸(保持原图比例,在LinearLayout中居中平铺) */ private void adjustImageViewSize() { - LogUtils.d(TAG, "=== adjustImageViewSize 启动 ==="); + //LogUtils.d(TAG, "=== adjustImageViewSize 启动 ==="); if (mLlContainer == null || mIvBackground == null) { - LogUtils.e(TAG, "控件为空"); + //LogUtils.e(TAG, "控件为空"); return; } @@ -214,7 +215,7 @@ public class BackgroundView extends RelativeLayout { public void run() { adjustImageViewSize(); } - }, 10); + }, 120); return; } @@ -235,8 +236,8 @@ public class BackgroundView extends RelativeLayout { mIvBackground.setLayoutParams(params); mIvBackground.setScaleType(ScaleType.FIT_CENTER); // 确保居中平铺 - LogUtils.d(TAG, "ImageView尺寸:" + ivWidth + "x" + ivHeight); - LogUtils.d(TAG, "=== adjustImageViewSize 完成 ==="); + //LogUtils.d(TAG, "ImageView尺寸:" + ivWidth + "x" + ivHeight); + //LogUtils.d(TAG, "=== adjustImageViewSize 完成 ==="); } private void setDefaultTransparentBackground() {