添加WinBoll类库,替换应用基类。
This commit is contained in:
		| @@ -60,10 +60,13 @@ dependencies { | |||||||
|     // 网络连接类库 |     // 网络连接类库 | ||||||
|     api 'com.squareup.okhttp3:okhttp:4.4.1' |     api 'com.squareup.okhttp3:okhttp:4.4.1' | ||||||
|     // AndroidX 类库 |     // AndroidX 类库 | ||||||
|     api 'androidx.appcompat:appcompat:1.1.0' |     api 'androidx.appcompat:appcompat:1.0.0' | ||||||
|     api 'androidx.viewpager:viewpager:1.0.0' |  | ||||||
|     api 'androidx.vectordrawable:vectordrawable:1.1.0' |  | ||||||
|     api 'androidx.vectordrawable:vectordrawable-animated:1.1.0' |  | ||||||
|     api 'androidx.fragment:fragment:1.1.0' |  | ||||||
|     api 'com.google.android.material:material:1.4.0' |     api 'com.google.android.material:material:1.4.0' | ||||||
|  |     //api 'androidx.viewpager:viewpager:1.0.0' | ||||||
|  |     //api 'androidx.vectordrawable:vectordrawable:1.1.0' | ||||||
|  |     //api 'androidx.vectordrawable:vectordrawable-animated:1.1.0' | ||||||
|  |     //api 'androidx.fragment:fragment:1.1.0' | ||||||
|  |      | ||||||
|  |     api 'cc.winboll.studio:libappbase:15.0.9' | ||||||
|  |     api 'cc.winboll.studio:libapputils:15.0.11' | ||||||
| } | } | ||||||
|   | |||||||
| @@ -1,8 +1,8 @@ | |||||||
| #Created by .winboll/winboll_app_build.gradle | #Created by .winboll/winboll_app_build.gradle | ||||||
| #Mon Mar 24 05:27:16 GMT 2025 | #Mon Mar 24 06:15:17 GMT 2025 | ||||||
| stageCount=0 | stageCount=0 | ||||||
| libraryProject= | libraryProject= | ||||||
| baseVersion=15.0 | baseVersion=15.0 | ||||||
| publishVersion=15.0.0 | publishVersion=15.0.0 | ||||||
| buildCount=1 | buildCount=7 | ||||||
| baseBetaVersion=15.0.1 | baseBetaVersion=15.0.1 | ||||||
|   | |||||||
| @@ -8,9 +8,9 @@ | |||||||
|         android:icon="@mipmap/ic_launcher" |         android:icon="@mipmap/ic_launcher" | ||||||
|         android:roundIcon="@mipmap/ic_launcher_round" |         android:roundIcon="@mipmap/ic_launcher_round" | ||||||
|         android:label="@string/app_name" |         android:label="@string/app_name" | ||||||
|         android:theme="@style/AppTheme" |         android:theme="@style/MyAppTheme" | ||||||
|         android:resizeableActivity="true" |         android:resizeableActivity="true" | ||||||
|         android:name=".GlobalApplication"> |         android:name=".App"> | ||||||
|  |  | ||||||
|         <activity |         <activity | ||||||
|             android:name=".MainActivity" |             android:name=".MainActivity" | ||||||
| @@ -34,4 +34,4 @@ | |||||||
|  |  | ||||||
|     </application> |     </application> | ||||||
|  |  | ||||||
| </manifest> | </manifest> | ||||||
|   | |||||||
| @@ -1,7 +1,6 @@ | |||||||
| package cc.winboll.studio.androidxdemo; | package cc.winboll.studio.androidxdemo; | ||||||
| 
 | 
 | ||||||
| import android.app.Activity; | import android.app.Activity; | ||||||
| import android.app.Application; |  | ||||||
| import android.content.ClipData; | import android.content.ClipData; | ||||||
| import android.content.ClipboardManager; | import android.content.ClipboardManager; | ||||||
| import android.content.Context; | import android.content.Context; | ||||||
| @@ -22,6 +21,7 @@ import android.widget.HorizontalScrollView; | |||||||
| import android.widget.ScrollView; | import android.widget.ScrollView; | ||||||
| import android.widget.TextView; | import android.widget.TextView; | ||||||
| import android.widget.Toast; | import android.widget.Toast; | ||||||
|  | import cc.winboll.studio.libappbase.GlobalApplication; | ||||||
| import java.io.ByteArrayInputStream; | import java.io.ByteArrayInputStream; | ||||||
| import java.io.ByteArrayOutputStream; | import java.io.ByteArrayOutputStream; | ||||||
| import java.io.Closeable; | import java.io.Closeable; | ||||||
| @@ -39,15 +39,15 @@ import java.util.Date; | |||||||
| import java.util.LinkedHashMap; | import java.util.LinkedHashMap; | ||||||
| import java.util.concurrent.atomic.AtomicBoolean; | import java.util.concurrent.atomic.AtomicBoolean; | ||||||
| 
 | 
 | ||||||
| public class GlobalApplication extends Application { | public class App extends GlobalApplication { | ||||||
| 
 | 
 | ||||||
|     private static Handler MAIN_HANDLER = new Handler(Looper.getMainLooper()); |     private static Handler MAIN_HANDLER = new Handler(Looper.getMainLooper()); | ||||||
| 
 | 
 | ||||||
|     @Override |     @Override | ||||||
|     public void onCreate() { |     public void onCreate() { | ||||||
|         super.onCreate(); |         super.onCreate(); | ||||||
|         CrashHandler.getInstance().registerGlobal(this); |         //CrashHandler.getInstance().registerGlobal(this); | ||||||
|         CrashHandler.getInstance().registerPart(this); |         //CrashHandler.getInstance().registerPart(this); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public static void write(InputStream input, OutputStream output) throws IOException { |     public static void write(InputStream input, OutputStream output) throws IOException { | ||||||
| @@ -252,7 +252,7 @@ public class GlobalApplication extends Application { | |||||||
| 
 | 
 | ||||||
|             private static String getKernel() { |             private static String getKernel() { | ||||||
|                 try { |                 try { | ||||||
|                     return GlobalApplication.toString(new FileInputStream("/proc/version")).trim(); |                     return App.toString(new FileInputStream("/proc/version")).trim(); | ||||||
|                 } catch (Throwable e) { |                 } catch (Throwable e) { | ||||||
|                     return e.getMessage(); |                     return e.getMessage(); | ||||||
|                 } |                 } | ||||||
| @@ -331,4 +331,4 @@ public class GlobalApplication extends Application { | |||||||
|             restart(); |             restart(); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @@ -1,7 +1,7 @@ | |||||||
| <resources> | <resources> | ||||||
|  |  | ||||||
|     <!-- Base application theme. --> |     <!-- Base application theme. --> | ||||||
|     <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> |     <style name="MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar"> | ||||||
|         <!-- Customize your theme here. --> |         <!-- Customize your theme here. --> | ||||||
|         <item name="colorPrimary">@color/colorPrimary</item> |         <item name="colorPrimary">@color/colorPrimary</item> | ||||||
|         <item name="colorPrimaryDark">@color/colorPrimaryDark</item> |         <item name="colorPrimaryDark">@color/colorPrimaryDark</item> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 ZhanGSKen
					ZhanGSKen