移动应用基础数据模型到 APPBase 类库。
This commit is contained in:
		| @@ -1,8 +1,8 @@ | ||||
| #Created by .winboll/winboll_app_build.gradle | ||||
| #Mon Mar 24 17:14:51 HKT 2025 | ||||
| #Mon Mar 24 19:27:05 GMT 2025 | ||||
| stageCount=16 | ||||
| libraryProject=libapputils | ||||
| baseVersion=15.0 | ||||
| publishVersion=15.0.15 | ||||
| buildCount=0 | ||||
| buildCount=2 | ||||
| baseBetaVersion=15.0.16 | ||||
|   | ||||
| @@ -7,10 +7,7 @@ package cc.winboll.studio.apputils; | ||||
|  */ | ||||
| import android.app.Application; | ||||
| import android.content.Context; | ||||
| import android.widget.Toast; | ||||
| import cc.winboll.studio.libappbase.GlobalApplication; | ||||
| import cc.winboll.studio.libappbase.LogUtils; | ||||
| import cc.winboll.studio.libapputils.bean.DebugBean; | ||||
|  | ||||
| public class App extends GlobalApplication { | ||||
|  | ||||
| @@ -49,37 +46,5 @@ public class App extends GlobalApplication { | ||||
|     @Override | ||||
|     public void onCreate() { | ||||
|         super.onCreate(); | ||||
|         // 应用环境初始化, 基本调试环境 | ||||
|         // | ||||
|         // 初始化日志模块 | ||||
|         //LogUtils.init(this); | ||||
|  | ||||
|         try { | ||||
|             // 初始化 Toast 框架 | ||||
| //            ToastUtils.init(this); | ||||
| //            // 设置 Toast 布局样式 | ||||
| //            //ToastUtils.setView(R.layout.view_toast); | ||||
| //            ToastUtils.setStyle(new WhiteToastStyle()); | ||||
| //            ToastUtils.setGravity(Gravity.BOTTOM, 0, 200); | ||||
|             // 设置应用调试标志 | ||||
|             DebugBean debugBean = DebugBean.loadBean(this, DebugBean.class); | ||||
|             if (debugBean == null) { | ||||
|                 //ToastUtils.show("debugBean == null"); | ||||
|                 setIsDebug(false); | ||||
|             } else { | ||||
|                 //ToastUtils.show("saveDebugStatus(" + String.valueOf(debugBean.isDebuging()) + ")"); | ||||
|                 setIsDebug(debugBean.isDebuging()); | ||||
|             } | ||||
|             // 应用窗口管理模块参数设置 | ||||
|             // | ||||
|             //mMyActivityLifecycleCallbacks = new MyActivityLifecycleCallbacks(); | ||||
|             //registerActivityLifecycleCallbacks(mMyActivityLifecycleCallbacks); | ||||
|             // 设置默认 WinBoll 应用 UI 类型 | ||||
|             //WinBollActivityManager.getInstance(this).setWinBollUI_TYPE(WinBollActivityManager.WinBollUI_TYPE.Service); | ||||
|             //ToastUtils.show("WinBollUI_TYPE " + getWinBollUI_TYPE()); | ||||
|         } catch (Exception e) { | ||||
|             LogUtils.d(TAG, e, Thread.currentThread().getStackTrace()); | ||||
|             Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show(); | ||||
|         } | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -35,5 +35,5 @@ dependencies { | ||||
|     // SSH | ||||
|     //api 'com.jcraft:jsch:0.1.55' | ||||
|      | ||||
|     api 'cc.winboll.studio:libappbase:15.0.5' | ||||
|     api 'cc.winboll.studio:libappbase:15.0.10' | ||||
| } | ||||
|   | ||||
| @@ -1,8 +1,8 @@ | ||||
| #Created by .winboll/winboll_app_build.gradle | ||||
| #Mon Mar 24 17:14:43 HKT 2025 | ||||
| #Mon Mar 24 19:27:05 GMT 2025 | ||||
| stageCount=16 | ||||
| libraryProject=libapputils | ||||
| baseVersion=15.0 | ||||
| publishVersion=15.0.15 | ||||
| buildCount=0 | ||||
| buildCount=2 | ||||
| baseBetaVersion=15.0.16 | ||||
|   | ||||
| @@ -1,75 +0,0 @@ | ||||
| package cc.winboll.studio.libapputils.bean; | ||||
|  | ||||
| /** | ||||
|  * @Author ZhanGSKen@QQ.COM | ||||
|  * @Date 2024/12/25 12:38:07 | ||||
|  * @Describe 应用调试配置类 | ||||
|  */ | ||||
| import android.util.JsonReader; | ||||
| import android.util.JsonWriter; | ||||
| import cc.winboll.studio.libappbase.BaseBean; | ||||
| import java.io.IOException; | ||||
|  | ||||
| public class DebugBean extends BaseBean { | ||||
|  | ||||
|     public static final String TAG = "DebugBean"; | ||||
|  | ||||
|     // 应用是否处于正在调试状态 | ||||
|     // | ||||
|     boolean isDebuging = false; | ||||
|      | ||||
|     public DebugBean() { | ||||
|         this.isDebuging = false; | ||||
|     } | ||||
|  | ||||
|     public DebugBean(boolean isDebuging) { | ||||
|         this.isDebuging = isDebuging; | ||||
|     } | ||||
|  | ||||
|     public void setIsDebuging(boolean isDebuging) { | ||||
|         this.isDebuging = isDebuging; | ||||
|     } | ||||
|  | ||||
|     public boolean isDebuging() { | ||||
|         return isDebuging; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String getName() { | ||||
|         return DebugBean.class.getName(); | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public void writeThisToJsonWriter(JsonWriter jsonWriter) throws IOException { | ||||
|         super.writeThisToJsonWriter(jsonWriter); | ||||
|         DebugBean bean = this; | ||||
|         jsonWriter.name("isDebuging").value(bean.isDebuging()); | ||||
|  | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public boolean initObjectsFromJsonReader(JsonReader jsonReader, String name) throws IOException { | ||||
|         if (super.initObjectsFromJsonReader(jsonReader, name)) { return true; } else { | ||||
|             if (name.equals("isDebuging")) { | ||||
|                 setIsDebuging(jsonReader.nextBoolean()); | ||||
|             } else { | ||||
|                 return false; | ||||
|             } | ||||
|         } | ||||
|         return true; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public BaseBean readBeanFromJsonReader(JsonReader jsonReader) throws IOException { | ||||
|         jsonReader.beginObject(); | ||||
|         while (jsonReader.hasNext()) { | ||||
|             String name = jsonReader.nextName(); | ||||
|             if (!initObjectsFromJsonReader(jsonReader, name)) { | ||||
|                 jsonReader.skipValue(); | ||||
|             } | ||||
|         } | ||||
|         // 结束 JSON 对象 | ||||
|         jsonReader.endObject(); | ||||
|         return this; | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 ZhanGSKen
					ZhanGSKen