|
|
@ -19,7 +19,7 @@ object ActivityHelp { |
|
|
|
* 判断指定Activity是否存在 |
|
|
|
* 判断指定Activity是否存在 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
fun isExist(activityClass: Class<*>): Boolean { |
|
|
|
fun isExist(activityClass: Class<*>): Boolean { |
|
|
|
for (item in activities) { |
|
|
|
activities.forEach { item -> |
|
|
|
if (item.get()?.javaClass == activityClass) { |
|
|
|
if (item.get()?.javaClass == activityClass) { |
|
|
|
return true |
|
|
|
return true |
|
|
|
} |
|
|
|
} |
|
|
@ -63,7 +63,7 @@ object ActivityHelp { |
|
|
|
* 关闭指定 activity |
|
|
|
* 关闭指定 activity |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
fun finishActivity(vararg activities: Activity) { |
|
|
|
fun finishActivity(vararg activities: Activity) { |
|
|
|
for (activity in activities) { |
|
|
|
activities.forEach { activity -> |
|
|
|
activity.finish() |
|
|
|
activity.finish() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -81,8 +81,8 @@ object ActivityHelp { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
for (activityWeakReference in waitFinish) { |
|
|
|
waitFinish.forEach { |
|
|
|
activityWeakReference.get()?.finish() |
|
|
|
it.get()?.finish() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|