提高应用调试性能

This commit is contained in:
2025-12-02 14:08:30 +08:00
parent e190d3ff39
commit 8fb7147333
2 changed files with 8 additions and 10 deletions

View File

@@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle #Created by .winboll/winboll_app_build.gradle
#Tue Dec 02 05:57:17 GMT 2025 #Tue Dec 02 06:01:03 GMT 2025
stageCount=13 stageCount=13
libraryProject= libraryProject=
baseVersion=15.11 baseVersion=15.11
publishVersion=15.11.12 publishVersion=15.11.12
buildCount=107 buildCount=110
baseBetaVersion=15.11.13 baseBetaVersion=15.11.13

View File

@@ -326,21 +326,19 @@ public class BackgroundView extends RelativeLayout {
* 适配场景:控件初始化、图片加载后、父容器尺寸变化(如屏幕旋转) * 适配场景:控件初始化、图片加载后、父容器尺寸变化(如屏幕旋转)
*/ */
private void adjustImageViewSize() { private void adjustImageViewSize() {
LogUtils.d(TAG, "=== adjustImageViewSize调整ImageView尺寸启动 ==="); //LogUtils.d(TAG, "=== adjustImageViewSize调整ImageView尺寸启动 ===");
// 获取当前控件尺寸(已完全填充父视图,即父容器尺寸) // 获取当前控件尺寸(已完全填充父视图,即父容器尺寸)
int parentWidth = getWidth(); int parentWidth = getWidth();
int parentHeight = getHeight(); int parentHeight = getHeight();
// 父容器未测量完成(宽/高为0延迟调整避免尺寸计算错误 // 父容器未测量完成(宽/高为0延迟调整避免尺寸计算错误
if (parentWidth == 0 || parentHeight == 0) { if (parentWidth == 0 || parentHeight == 0) {
LogUtils.w(TAG, "【adjustImageViewSize】父容器未测量完成延迟调整尺寸");
post(new Runnable() { post(new Runnable() {
@Override @Override
public void run() { public void run() {
adjustImageViewSize(); // 延迟后重新调整 adjustImageViewSize(); // 延迟后重新调整
} }
}); });
LogUtils.d(TAG, "=== adjustImageViewSize调整ImageView尺寸完成延迟调整===");
return; return;
} }
@@ -372,11 +370,11 @@ public class BackgroundView extends RelativeLayout {
layoutParams.height = imageViewHeight; layoutParams.height = imageViewHeight;
mivBackground.setLayoutParams(layoutParams); mivBackground.setLayoutParams(layoutParams);
LogUtils.d(TAG, "【adjustImageViewSize】尺寸调整成功"); // LogUtils.d(TAG, "【adjustImageViewSize】尺寸调整成功");
LogUtils.d(TAG, "→ 父控件尺寸:" + parentWidth + "x" + parentHeight); // LogUtils.d(TAG, "→ 父控件尺寸:" + parentWidth + "x" + parentHeight);
LogUtils.d(TAG, "→ ImageView调整后尺寸" + imageViewWidth + "x" + imageViewHeight); // LogUtils.d(TAG, "→ ImageView调整后尺寸" + imageViewWidth + "x" + imageViewHeight);
LogUtils.d(TAG, "→ 图片宽高比:" + mnImageAspectRatio); // LogUtils.d(TAG, "→ 图片宽高比:" + mnImageAspectRatio);
LogUtils.d(TAG, "=== adjustImageViewSize调整ImageView尺寸完成调整成功==="); // LogUtils.d(TAG, "=== adjustImageViewSize调整ImageView尺寸完成调整成功===");
} }
/** /**