diff --git a/powerbell/build.properties b/powerbell/build.properties index f361f4eb..6b1d5cc7 100644 --- a/powerbell/build.properties +++ b/powerbell/build.properties @@ -1,8 +1,8 @@ #Created by .winboll/winboll_app_build.gradle -#Mon Dec 01 09:45:38 GMT 2025 +#Mon Dec 01 16:33:23 GMT 2025 stageCount=13 libraryProject= baseVersion=15.11 publishVersion=15.11.12 -buildCount=60 +buildCount=98 baseBetaVersion=15.11.13 diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/activities/BackgroundSettingsActivity.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/activities/BackgroundSettingsActivity.java index 802e6f8b..42e9d961 100644 --- a/powerbell/src/main/java/cc/winboll/studio/powerbell/activities/BackgroundSettingsActivity.java +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/activities/BackgroundSettingsActivity.java @@ -1196,7 +1196,7 @@ public class BackgroundSettingsActivity extends WinBoLLActivity implements Backg int pixelColor = formalBean.getPixelColor(); // 同步预览Bean的颜色值(关键优化:确保旋转恢复后颜色一致) mBgSourceUtils.getPreviewBackgroundBean().setPixelColor(pixelColor); - bvPreviewBackground.setPixelColor(pixelColor); + bvPreviewBackground.setBackgroundColor(pixelColor); LogUtils.d(TAG, "【颜色更新】背景颜色已设置:" + Integer.toHexString(pixelColor)); } 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 05c03a52..2a7d9669 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 @@ -100,10 +100,6 @@ public class BackgroundView extends RelativeLayout { this.addView(ivBackground); // 添加到父容器(控件本身) } - public void setPixelColor(int nBackgroundColor) { - ivBackground.setBackgroundColor(nBackgroundColor); - } - /** * 【对外提供】重新加载正式背景图片(从正式Bean获取路径) * 用于:退出预览模式、恢复默认背景、正式背景更新后刷新 @@ -222,10 +218,7 @@ public class BackgroundView extends RelativeLayout { */ private void setDefaultBackground() { isPreviewMode = true; - ivBackground.setScaleType(ScaleType.FIT_CENTER); - ivBackground.setBackgroundColor(0x00000000); // 全透明背景 - ivBackground.setImageBitmap(null); // 清空图片,避免残留 - imageAspectRatio = 1.0f; // 重置宽高比 + setBackgroundColor(0x00000000); // 全透明背景 adjustImageViewSize(); // 调整尺寸,确保居中 LogUtils.d(TAG, "【默认背景】使用透明背景(无图片资源)"); } @@ -296,17 +289,17 @@ public class BackgroundView extends RelativeLayout { * 【新增工具函数】校验图片路径有效性(路径非空+文件存在+是文件+大小合理) * 用于:reloadPreviewBackground中压缩图/原始图的前置校验,避免无效加载 */ - private boolean isImagePathValid(String imagePath) { - if (imagePath == null || imagePath.isEmpty()) { - LogUtils.d(TAG, "图片路径为空,无效"); - return false; - } - File imageFile = new File(imagePath); - // 校验:文件存在 + 是普通文件 + 大小>100字节(避免空文件/损坏文件) - boolean isValid = imageFile.exists() && imageFile.isFile() && imageFile.length() > 100; - LogUtils.d(TAG, "图片路径校验:" + imagePath + ",是否有效:" + isValid + "(大小:" + imageFile.length() + "字节)"); - return isValid; - } +// private boolean isImagePathValid(String imagePath) { +// if (imagePath == null || imagePath.isEmpty()) { +// LogUtils.d(TAG, "图片路径为空,无效"); +// return false; +// } +// File imageFile = new File(imagePath); +// // 校验:文件存在 + 是普通文件 + 大小>100字节(避免空文件/损坏文件) +// boolean isValid = imageFile.exists() && imageFile.isFile() && imageFile.length() > 100; +// LogUtils.d(TAG, "图片路径校验:" + imagePath + ",是否有效:" + isValid + "(大小:" + imageFile.length() + "字节)"); +// return isValid; +// } /** * 计算图片原始宽高比(宽/高)→ 控制不拉伸的核心 diff --git a/powerbell/src/main/res/layout/activity_background_settings.xml b/powerbell/src/main/res/layout/activity_background_settings.xml index 40ae2bea..989e7ee0 100644 --- a/powerbell/src/main/res/layout/activity_background_settings.xml +++ b/powerbell/src/main/res/layout/activity_background_settings.xml @@ -12,129 +12,138 @@ android:id="@+id/toolbar" style="@style/DefaultAToolbar"/> - + - - - - - - - - - - - - - - + android:background="#FF28C000"> + android:layout_height="match_parent"> - + - - - + + android:layout_height="400dp" + android:background="#B92FABE6"> - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + - + - +