Compare commits

..

7 Commits

4 changed files with 10 additions and 13 deletions

View File

@@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle #Created by .winboll/winboll_app_build.gradle
#Wed Dec 10 17:43:17 HKT 2025 #Wed Dec 10 18:32:41 HKT 2025
stageCount=6 stageCount=9
libraryProject= libraryProject=
baseVersion=15.12 baseVersion=15.12
publishVersion=15.12.5 publishVersion=15.12.8
buildCount=0 buildCount=0
baseBetaVersion=15.12.6 baseBetaVersion=15.12.9

View File

@@ -150,12 +150,6 @@ public class MainActivity extends WinBoLLActivity {
_mMainActivity = null; _mMainActivity = null;
} }
@Override
protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
reloadBackground();
}
@Override @Override
protected void onResume() { protected void onResume() {
super.onResume(); super.onResume();

View File

@@ -4,9 +4,9 @@ import android.content.Context;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.BitmapFactory; import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.ColorDrawable;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.ImageView.ScaleType; import android.widget.ImageView.ScaleType;
import android.widget.LinearLayout; import android.widget.LinearLayout;
@@ -132,6 +132,8 @@ public class BackgroundView extends RelativeLayout {
setDefaultTransparentBackground(); setDefaultTransparentBackground();
return; return;
} }
mIvBackground.setVisibility(View.GONE);
// 计算原图比例 // 计算原图比例
if (!calculateImageAspectRatio(imageFile)) { if (!calculateImageAspectRatio(imageFile)) {
@@ -215,7 +217,7 @@ public class BackgroundView extends RelativeLayout {
public void run() { public void run() {
adjustImageViewSize(); adjustImageViewSize();
} }
}, 120); }, 150);
return; return;
} }
@@ -235,6 +237,8 @@ public class BackgroundView extends RelativeLayout {
params.height = ivHeight; params.height = ivHeight;
mIvBackground.setLayoutParams(params); mIvBackground.setLayoutParams(params);
mIvBackground.setScaleType(ScaleType.FIT_CENTER); // 确保居中平铺 mIvBackground.setScaleType(ScaleType.FIT_CENTER); // 确保居中平铺
mIvBackground.setVisibility(View.VISIBLE);
//LogUtils.d(TAG, "ImageView尺寸" + ivWidth + "x" + ivHeight); //LogUtils.d(TAG, "ImageView尺寸" + ivWidth + "x" + ivHeight);
//LogUtils.d(TAG, "=== adjustImageViewSize 完成 ==="); //LogUtils.d(TAG, "=== adjustImageViewSize 完成 ===");

View File

@@ -34,7 +34,6 @@
android:orientation="vertical" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="#FF7381FF"
android:id="@+id/fragmentmainviewBackgroundView1"/> android:id="@+id/fragmentmainviewBackgroundView1"/>
<LinearLayout <LinearLayout