Compare commits

..

2 Commits

Author SHA1 Message Date
9f4211c83e <powerbell>APK 15.12.12 release Publish. 2025-12-10 20:37:42 +08:00
447a786632 图片尺寸调整函数优化 2025-12-10 20:31:10 +08:00
2 changed files with 34 additions and 33 deletions

View File

@@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle
#Wed Dec 10 20:11:13 HKT 2025
stageCount=12
#Wed Dec 10 20:37:42 HKT 2025
stageCount=13
libraryProject=
baseVersion=15.12
publishVersion=15.12.11
publishVersion=15.12.12
buildCount=0
baseBetaVersion=15.12.12
baseBetaVersion=15.12.13

View File

@@ -211,16 +211,17 @@ public class BackgroundView extends RelativeLayout {
// 获取LinearLayout尺寸
int llWidth = mLlContainer.getWidth();
int llHeight = mLlContainer.getHeight();
if (llWidth == 0 || llHeight == 0) {
postDelayed(new Runnable() {
@Override
public void run() {
adjustImageViewSize();
}
}, 100);
return;
}
// if (llWidth == 0 || llHeight == 0) {
// postDelayed(new Runnable() {
// @Override
// public void run() {
// adjustImageViewSize();
// }
// }, 100);
// return;
// }
if (llWidth != 0 && llHeight != 0) {
// 计算ImageView尺寸保持比例不超出LinearLayout
int ivWidth, ivHeight;
if (mImageAspectRatio >= 1.0f) {
@@ -239,10 +240,10 @@ public class BackgroundView extends RelativeLayout {
mIvBackground.setScaleType(ScaleType.FIT_CENTER); // 确保居中平铺
mIvBackground.setVisibility(View.VISIBLE);
//LogUtils.d(TAG, "ImageView尺寸" + ivWidth + "x" + ivHeight);
//LogUtils.d(TAG, "=== adjustImageViewSize 完成 ===");
}
}
private void setDefaultTransparentBackground() {
mIvBackground.setImageBitmap(null);