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)); } }