From 9aaf17ce2bd139adfcbf081bd63c491911c54dd7 Mon Sep 17 00:00:00 2001 From: mxlei Date: Wed, 31 Aug 2022 14:24:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3activity=E7=BB=93=E6=9D=9F?= =?UTF-8?q?=E5=90=8E=E5=88=A0=E9=99=A4=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 2 ++ settings.gradle | 1 + .../src/main/java/com/github/jeffery/skin/SkinManger.java | 5 +---- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index e5d8a53..752515e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -33,6 +33,8 @@ dependencies { implementation 'com.google.android.material:material:1.4.0' implementation 'androidx.constraintlayout:constraintlayout:2.0.4' implementation project(':skin-changer') +// implementation 'com.github.JefferyBoy:AndroidSkinChanger:1.0.0' + testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' diff --git a/settings.gradle b/settings.gradle index cdef1b3..cc1eaee 100644 --- a/settings.gradle +++ b/settings.gradle @@ -10,6 +10,7 @@ dependencyResolutionManagement { repositories { google() mavenCentral() + maven { url 'https://jitpack.io' } } } rootProject.name = "AndroidSkinChanger" diff --git a/skin-changer/src/main/java/com/github/jeffery/skin/SkinManger.java b/skin-changer/src/main/java/com/github/jeffery/skin/SkinManger.java index 850706a..75d05a5 100644 --- a/skin-changer/src/main/java/com/github/jeffery/skin/SkinManger.java +++ b/skin-changer/src/main/java/com/github/jeffery/skin/SkinManger.java @@ -9,8 +9,6 @@ import android.content.pm.PackageManager; import android.content.res.AssetManager; import android.content.res.Resources; -import android.graphics.Color; -import android.graphics.RegionIterator; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.view.LayoutInflater; @@ -28,7 +26,6 @@ import java.lang.reflect.Method; import java.util.HashSet; import java.util.List; -import java.util.Map; import java.util.Objects; import java.util.Set; import java.util.Stack; @@ -346,6 +343,6 @@ public void onActivityResumed(@NonNull Activity activity) { @Override public void onActivityDestroyed(@NonNull Activity activity) { - activityStack.pop(); + activityStack.remove(getActivityRecord(activity)); } }