修改背景控件默认背景颜色。

This commit is contained in:
2025-12-20 21:23:52 +08:00
parent 04b597cbe7
commit 2a75aa140e
6 changed files with 8 additions and 3 deletions

View File

@@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle
#Sat Dec 20 19:28:00 HKT 2025
#Sat Dec 20 13:21:44 GMT 2025
stageCount=12
libraryProject=
baseVersion=15.14
publishVersion=15.14.11
buildCount=0
buildCount=14
baseBetaVersion=15.14.12

Binary file not shown.

After

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 B

View File

@@ -1,6 +1,7 @@
package cc.winboll.studio.powerbell.utils;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.media.ExifInterface;
import android.net.Uri;
@@ -11,6 +12,7 @@ import androidx.core.content.FileProvider;
import cc.winboll.studio.libappbase.LogUtils;
import cc.winboll.studio.libappbase.ToastUtils;
import cc.winboll.studio.powerbell.BuildConfig;
import cc.winboll.studio.powerbell.R;
import cc.winboll.studio.powerbell.models.BackgroundBean;
import java.io.BufferedOutputStream;
import java.io.File;
@@ -190,7 +192,7 @@ public class BackgroundSourceUtils {
mCropSourceFile = new File(fCropCacheDir, newCropFileName + "." + fileSuffix);
mCropResultFile = new File(fCropCacheDir, "SelectCompress_" + newCropFileName + "." + fileSuffix);
AssetsCopyUtils.copyAssetsFileToDir(mContext, "images/blank10x10.png", mCropSourceFile.getAbsolutePath());
AssetsCopyUtils.copyAssetsFileToDir(mContext, "images/blank100x100.png", mCropSourceFile.getAbsolutePath());
try {
mCropResultFile.createNewFile();
} catch (IOException e) {
@@ -198,6 +200,7 @@ public class BackgroundSourceUtils {
}
loadSettings();
previewBackgroundBean.setPixelColor(0xFFFFFFFF);
previewBackgroundBean.setIsUseBackgroundFile(true);
previewBackgroundBean.setIsUseBackgroundScaledCompressFile(false);
previewBackgroundBean.setBackgroundFileName(mCropSourceFile.getName());

View File

@@ -15,6 +15,7 @@ import cc.winboll.studio.libappbase.LogUtils;
import cc.winboll.studio.libappbase.ToastUtils;
import cc.winboll.studio.powerbell.App;
import cc.winboll.studio.powerbell.models.BackgroundBean;
import cc.winboll.studio.powerbell.utils.BackgroundSourceUtils;
import java.io.File;
/**
@@ -289,5 +290,6 @@ public class BackgroundView extends RelativeLayout {
super.onSizeChanged(w, h, oldw, oldh);
adjustImageViewSize(); // 尺寸变化时重新调整
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 B