mirror of
http://gitea.winboll.cc/Studio/WinBoLL.git
synced 2026-06-29 03:59:55 +08:00
提交AESUtils init 初始化方案
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Thu May 28 13:25:30 GMT 2026
|
||||
#Mon Jun 01 16:38:02 GMT 2026
|
||||
stageCount=11
|
||||
libraryProject=libaes
|
||||
baseVersion=15.20
|
||||
publishVersion=15.20.10
|
||||
buildCount=1
|
||||
buildCount=4
|
||||
baseBetaVersion=15.20.11
|
||||
|
||||
@@ -5,10 +5,11 @@ package cc.winboll.studio.aes;
|
||||
* @Date 2024/06/13 19:03:58
|
||||
* @Describe AES应用类
|
||||
*/
|
||||
import android.view.Gravity;
|
||||
import cc.winboll.studio.libaes.utils.AESThemeUtil;
|
||||
import cc.winboll.studio.libaes.utils.WinBoLLActivityManager;
|
||||
import cc.winboll.studio.libappbase.GlobalApplication;
|
||||
import cc.winboll.studio.libappbase.ToastUtils;
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
public class App extends GlobalApplication {
|
||||
@@ -18,6 +19,7 @@ public class App extends GlobalApplication {
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
AESThemeUtil.init(null);
|
||||
WinBoLLActivityManager.init(this);
|
||||
|
||||
// 初始化 Toast 框架
|
||||
|
||||
@@ -66,9 +66,9 @@ dependencies {
|
||||
//annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
|
||||
|
||||
// WinBoLL库 nexus.winboll.cc 地址
|
||||
api 'cc.winboll.studio:libappbase:15.20.22'
|
||||
//api 'cc.winboll.studio:libappbase:15.20.22'
|
||||
// 备用库 jitpack.io 地址
|
||||
//api 'com.github.ZhanGSKen:libappbase:appbase-v15.15.21'
|
||||
api 'com.github.ZhanGSKen:libappbase:appbase-v15.20.22'
|
||||
|
||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Thu May 28 13:25:30 GMT 2026
|
||||
#Mon Jun 01 16:38:02 GMT 2026
|
||||
stageCount=11
|
||||
libraryProject=libaes
|
||||
baseVersion=15.20
|
||||
publishVersion=15.20.10
|
||||
buildCount=1
|
||||
buildCount=4
|
||||
baseBetaVersion=15.20.11
|
||||
|
||||
@@ -10,6 +10,7 @@ import android.util.JsonWriter;
|
||||
import cc.winboll.studio.libaes.R;
|
||||
import cc.winboll.studio.libappbase.models.libs1520000.BaseBean;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class AESThemeBean extends BaseBean {
|
||||
|
||||
@@ -42,6 +43,21 @@ public class AESThemeBean extends BaseBean {
|
||||
}
|
||||
}
|
||||
|
||||
public static void fillThemeStyleIDList(ArrayList<Integer> themeStyleIDList) {
|
||||
if (themeStyleIDList == null) {
|
||||
themeStyleIDList = new ArrayList<Integer>();
|
||||
|
||||
}
|
||||
themeStyleIDList.clear();
|
||||
themeStyleIDList.add(cc.winboll.studio.libaes.R.style.AESTheme);
|
||||
themeStyleIDList.add(cc.winboll.studio.libaes.R.style.DepthAESTheme);
|
||||
themeStyleIDList.add(cc.winboll.studio.libaes.R.style.SkyAESTheme);
|
||||
themeStyleIDList.add(cc.winboll.studio.libaes.R.style.GoldenAESTheme);
|
||||
themeStyleIDList.add(cc.winboll.studio.libaes.R.style.BearingAESTheme);
|
||||
themeStyleIDList.add(cc.winboll.studio.libaes.R.style.MemorAESTheme);
|
||||
themeStyleIDList.add(cc.winboll.studio.libaes.R.style.TaoAESTheme);
|
||||
}
|
||||
|
||||
// 保存当前主题
|
||||
int currentThemeStyleID = getThemeStyleID(ThemeType.AES);
|
||||
|
||||
@@ -74,8 +90,7 @@ public class AESThemeBean extends BaseBean {
|
||||
|
||||
@Override
|
||||
public boolean initObjectsFromJsonReader(JsonReader jsonReader, String name) throws IOException {
|
||||
if(super.initObjectsFromJsonReader(jsonReader, name)) { return true; }
|
||||
else{
|
||||
if (super.initObjectsFromJsonReader(jsonReader, name)) { return true; } else {
|
||||
if (name.equals("currentThemeTypeID")) {
|
||||
setCurrentThemeTypeID(jsonReader.nextInt());
|
||||
} else {
|
||||
|
||||
@@ -33,7 +33,11 @@ public class AESThemeUtil {
|
||||
* 初始化主题样式ID集合
|
||||
*/
|
||||
public static void init(ArrayList<Integer> themeStyleIDList) {
|
||||
AESThemeUtil.themeStyleIDList = themeStyleIDList;
|
||||
if(themeStyleIDList == null) {
|
||||
AESThemeBean.fillThemeStyleIDList(themeStyleIDList);
|
||||
}
|
||||
AESThemeUtil.themeStyleIDList.clear();
|
||||
AESThemeUtil.themeStyleIDList.addAll(themeStyleIDList);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user