Compare commits
3 Commits
powerbell-
...
powerbell-
| Author | SHA1 | Date | |
|---|---|---|---|
| f771225830 | |||
| 72794dc6e5 | |||
| 2ffdb26f69 |
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Tue Dec 23 21:02:16 HKT 2025
|
||||
stageCount=28
|
||||
#Wed Dec 24 12:22:06 HKT 2025
|
||||
stageCount=29
|
||||
libraryProject=
|
||||
baseVersion=15.14
|
||||
publishVersion=15.14.27
|
||||
publishVersion=15.14.28
|
||||
buildCount=0
|
||||
baseBetaVersion=15.14.28
|
||||
baseBetaVersion=15.14.29
|
||||
|
||||
@@ -45,7 +45,7 @@ public class MainActivity extends WinBoLLActivity implements MainContentView.OnV
|
||||
|
||||
// ======================== 静态常量(置顶统一,抽离魔法值)========================
|
||||
public static final String TAG = "MainActivity";
|
||||
private static final int REQUEST_READ_MEDIA_IMAGES = 1001;
|
||||
private static final int REQUEST_BACKGROUND_SETTINGS_ACTIVITY = 1001;
|
||||
private static final long DELAY_LOAD_NON_CRITICAL = 500L;
|
||||
public static final int MSG_RELOAD_APPCONFIG = 0;
|
||||
public static final int MSG_CURRENTVALUEBATTERY = 1;
|
||||
@@ -110,10 +110,7 @@ public class MainActivity extends WinBoLLActivity implements MainContentView.OnV
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
LogUtils.d(TAG, "onResume()");
|
||||
if (sGlobalHandler != null) {
|
||||
sGlobalHandler.sendEmptyMessage(MSG_LOAD_BACKGROUND);
|
||||
sGlobalHandler.sendEmptyMessage(MSG_UPDATE_SERVICE_SWITCH);
|
||||
}
|
||||
|
||||
if (mADsBannerView != null) {
|
||||
mADsBannerView.resumeADs(this);
|
||||
}
|
||||
@@ -167,7 +164,7 @@ public class MainActivity extends WinBoLLActivity implements MainContentView.OnV
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
LogUtils.d(TAG, "onActivityResult() | requestCode=" + requestCode + " | resultCode=" + resultCode + " | data=" + data);
|
||||
mPermissionUtils.handlePermissionRequest(this, requestCode, resultCode, data);
|
||||
if (requestCode == REQUEST_READ_MEDIA_IMAGES && sGlobalHandler != null) {
|
||||
if (requestCode == REQUEST_BACKGROUND_SETTINGS_ACTIVITY && sGlobalHandler != null) {
|
||||
sGlobalHandler.sendEmptyMessage(MSG_LOAD_BACKGROUND);
|
||||
}
|
||||
}
|
||||
@@ -207,7 +204,7 @@ public class MainActivity extends WinBoLLActivity implements MainContentView.OnV
|
||||
startActivity(new Intent(this, ClearRecordActivity.class));
|
||||
break;
|
||||
case R.id.action_changepicture:
|
||||
startActivityForResult(new Intent(this, BackgroundSettingsActivity.class), REQUEST_READ_MEDIA_IMAGES);
|
||||
startActivityForResult(new Intent(this, BackgroundSettingsActivity.class), REQUEST_BACKGROUND_SETTINGS_ACTIVITY);
|
||||
break;
|
||||
case R.id.action_unittestactivity:
|
||||
startActivity(new Intent(this, MainUnitTestActivity.class));
|
||||
@@ -274,7 +271,7 @@ public class MainActivity extends WinBoLLActivity implements MainContentView.OnV
|
||||
break;
|
||||
case MSG_LOAD_BACKGROUND:
|
||||
sMainActivity.reloadBackground();
|
||||
sMainActivity.setMainLayoutBackgroundColor();
|
||||
//sMainActivity.setMainLayoutBackgroundColor();
|
||||
break;
|
||||
case MSG_UPDATE_SERVICE_SWITCH:
|
||||
sMainActivity.updateServiceSwitchUI();
|
||||
@@ -406,24 +403,24 @@ public class MainActivity extends WinBoLLActivity implements MainContentView.OnV
|
||||
}
|
||||
BackgroundBean currentBgBean = mBgSourceUtils.getCurrentBackgroundBean();
|
||||
if (currentBgBean != null) {
|
||||
mMainContentView.backgroundView.loadByBackgroundBean(currentBgBean);
|
||||
mMainContentView.backgroundView.loadByBackgroundBean(currentBgBean, true);
|
||||
} else {
|
||||
mMainContentView.backgroundView.setBackgroundResource(R.drawable.default_background);
|
||||
}
|
||||
}
|
||||
|
||||
private void setMainLayoutBackgroundColor() {
|
||||
LogUtils.d(TAG, "setMainLayoutBackgroundColor()");
|
||||
if (isFinishing() || isDestroyed() || mMainContentView == null || mBgSourceUtils == null) {
|
||||
LogUtils.e(TAG, "setMainLayoutBackgroundColor: 上下文无效,设置失败");
|
||||
return;
|
||||
}
|
||||
BackgroundBean currentBgBean = mBgSourceUtils.getCurrentBackgroundBean();
|
||||
if (currentBgBean != null) {
|
||||
mMainContentView.mainLayout.setBackgroundColor(currentBgBean.getPixelColor());
|
||||
LogUtils.d(TAG, "setMainLayoutBackgroundColor: 主布局背景色设置完成 | color=" + currentBgBean.getPixelColor());
|
||||
}
|
||||
}
|
||||
// private void setMainLayoutBackgroundColor() {
|
||||
// LogUtils.d(TAG, "setMainLayoutBackgroundColor()");
|
||||
// if (isFinishing() || isDestroyed() || mMainContentView == null || mBgSourceUtils == null) {
|
||||
// LogUtils.e(TAG, "setMainLayoutBackgroundColor: 上下文无效,设置失败");
|
||||
// return;
|
||||
// }
|
||||
// BackgroundBean currentBgBean = mBgSourceUtils.getCurrentBackgroundBean();
|
||||
// if (currentBgBean != null) {
|
||||
// mMainContentView.mainLayout.setBackgroundColor(currentBgBean.getPixelColor());
|
||||
// LogUtils.d(TAG, "setMainLayoutBackgroundColor: 主布局背景色设置完成 | color=" + currentBgBean.getPixelColor2());
|
||||
// }
|
||||
// }
|
||||
|
||||
private void updateServiceSwitchUI() {
|
||||
LogUtils.d(TAG, "updateServiceSwitchUI()");
|
||||
|
||||
@@ -404,7 +404,7 @@ public class BackgroundSettingsActivity extends WinBoLLActivity {
|
||||
mBgSourceUtils.loadSettings();
|
||||
BackgroundBean previewBean = mBgSourceUtils.getPreviewBackgroundBean();
|
||||
mBackgroundView.loadByBackgroundBean(previewBean, true);
|
||||
mBackgroundView.setBackgroundColor(previewBean.getPixelColor());
|
||||
//mBackgroundView.setBackgroundColor(previewBean.getPixelColor());
|
||||
LogUtils.d(TAG, "【双重刷新】第一重完成");
|
||||
} catch (Exception e) {
|
||||
LogUtils.e(TAG, "【双重刷新】第一重异常:" + e.getMessage());
|
||||
@@ -420,7 +420,7 @@ public class BackgroundSettingsActivity extends WinBoLLActivity {
|
||||
mBgSourceUtils.loadSettings();
|
||||
BackgroundBean previewBean = mBgSourceUtils.getPreviewBackgroundBean();
|
||||
mBackgroundView.loadByBackgroundBean(previewBean, true);
|
||||
mBackgroundView.setBackgroundColor(previewBean.getPixelColor());
|
||||
//mBackgroundView.setBackgroundColor(previewBean.getPixelColor());
|
||||
LogUtils.d(TAG, "【双重刷新】第二重完成");
|
||||
} catch (Exception e) {
|
||||
LogUtils.e(TAG, "【双重刷新】第二重异常:" + e.getMessage());
|
||||
|
||||
@@ -243,7 +243,7 @@ public class MainUnitTest2Activity extends AppCompatActivity {
|
||||
// 第一重刷新
|
||||
try {
|
||||
mMemoryCachedBackgroundView.loadByBackgroundBean(mPreviewBackgroundBean, true);
|
||||
mMemoryCachedBackgroundView.setBackgroundColor(mPreviewBackgroundBean.getPixelColor());
|
||||
//mMemoryCachedBackgroundView.setBackgroundColor(mPreviewBackgroundBean.getPixelColor());
|
||||
LogUtils.d(TAG, "doubleRefreshPreview:【双重刷新】第一重完成");
|
||||
} catch (Exception e) {
|
||||
LogUtils.e(TAG, String.format("doubleRefreshPreview:【双重刷新】第一重异常 | %s", e.getMessage()));
|
||||
@@ -257,7 +257,7 @@ public class MainUnitTest2Activity extends AppCompatActivity {
|
||||
if (mMemoryCachedBackgroundView != null && !isFinishing()) {
|
||||
try {
|
||||
mMemoryCachedBackgroundView.loadByBackgroundBean(mPreviewBackgroundBean, true);
|
||||
mMemoryCachedBackgroundView.setBackgroundColor(mPreviewBackgroundBean.getPixelColor());
|
||||
//mMemoryCachedBackgroundView.setBackgroundColor(mPreviewBackgroundBean.getPixelColor());
|
||||
LogUtils.d(TAG, "doubleRefreshPreview:【双重刷新】第二重完成");
|
||||
} catch (Exception e) {
|
||||
LogUtils.e(TAG, String.format("doubleRefreshPreview:【双重刷新】第二重异常 | %s", e.getMessage()));
|
||||
|
||||
@@ -149,6 +149,7 @@ public class BackgroundView extends RelativeLayout {
|
||||
}
|
||||
// 加载图片
|
||||
loadImage(targetPath);
|
||||
setBackgroundColor(bean.getPixelColor());
|
||||
LogUtils.d(TAG, "=== loadByBackgroundBean 完成 ===");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user