修改背景控件默认背景颜色。
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#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
|
stageCount=12
|
||||||
libraryProject=
|
libraryProject=
|
||||||
baseVersion=15.14
|
baseVersion=15.14
|
||||||
publishVersion=15.14.11
|
publishVersion=15.14.11
|
||||||
buildCount=0
|
buildCount=14
|
||||||
baseBetaVersion=15.14.12
|
baseBetaVersion=15.14.12
|
||||||
|
|||||||
BIN
powerbell/src/main/assets/images/blank100x100.png
Normal file
BIN
powerbell/src/main/assets/images/blank100x100.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 517 B |
Binary file not shown.
|
Before Width: | Height: | Size: 100 B |
@@ -1,6 +1,7 @@
|
|||||||
package cc.winboll.studio.powerbell.utils;
|
package cc.winboll.studio.powerbell.utils;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.res.TypedArray;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.media.ExifInterface;
|
import android.media.ExifInterface;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
@@ -11,6 +12,7 @@ import androidx.core.content.FileProvider;
|
|||||||
import cc.winboll.studio.libappbase.LogUtils;
|
import cc.winboll.studio.libappbase.LogUtils;
|
||||||
import cc.winboll.studio.libappbase.ToastUtils;
|
import cc.winboll.studio.libappbase.ToastUtils;
|
||||||
import cc.winboll.studio.powerbell.BuildConfig;
|
import cc.winboll.studio.powerbell.BuildConfig;
|
||||||
|
import cc.winboll.studio.powerbell.R;
|
||||||
import cc.winboll.studio.powerbell.models.BackgroundBean;
|
import cc.winboll.studio.powerbell.models.BackgroundBean;
|
||||||
import java.io.BufferedOutputStream;
|
import java.io.BufferedOutputStream;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -190,7 +192,7 @@ public class BackgroundSourceUtils {
|
|||||||
mCropSourceFile = new File(fCropCacheDir, newCropFileName + "." + fileSuffix);
|
mCropSourceFile = new File(fCropCacheDir, newCropFileName + "." + fileSuffix);
|
||||||
mCropResultFile = new File(fCropCacheDir, "SelectCompress_" + 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 {
|
try {
|
||||||
mCropResultFile.createNewFile();
|
mCropResultFile.createNewFile();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
@@ -198,6 +200,7 @@ public class BackgroundSourceUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
loadSettings();
|
loadSettings();
|
||||||
|
previewBackgroundBean.setPixelColor(0xFFFFFFFF);
|
||||||
previewBackgroundBean.setIsUseBackgroundFile(true);
|
previewBackgroundBean.setIsUseBackgroundFile(true);
|
||||||
previewBackgroundBean.setIsUseBackgroundScaledCompressFile(false);
|
previewBackgroundBean.setIsUseBackgroundScaledCompressFile(false);
|
||||||
previewBackgroundBean.setBackgroundFileName(mCropSourceFile.getName());
|
previewBackgroundBean.setBackgroundFileName(mCropSourceFile.getName());
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import cc.winboll.studio.libappbase.LogUtils;
|
|||||||
import cc.winboll.studio.libappbase.ToastUtils;
|
import cc.winboll.studio.libappbase.ToastUtils;
|
||||||
import cc.winboll.studio.powerbell.App;
|
import cc.winboll.studio.powerbell.App;
|
||||||
import cc.winboll.studio.powerbell.models.BackgroundBean;
|
import cc.winboll.studio.powerbell.models.BackgroundBean;
|
||||||
|
import cc.winboll.studio.powerbell.utils.BackgroundSourceUtils;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -289,5 +290,6 @@ public class BackgroundView extends RelativeLayout {
|
|||||||
super.onSizeChanged(w, h, oldw, oldh);
|
super.onSizeChanged(w, h, oldw, oldh);
|
||||||
adjustImageViewSize(); // 尺寸变化时重新调整
|
adjustImageViewSize(); // 尺寸变化时重新调整
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 100 B |
Reference in New Issue
Block a user