Skip to content

Commit

Permalink
1.1.2
Browse files Browse the repository at this point in the history
feature-BaseApplication类增加结束全部Activity方法
  • Loading branch information
wxw-9527 committed Dec 6, 2022
1 parent df35359 commit f0116d6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@ dependencyResolutionManagement {

```groovy
dependencies {
implementation 'com.github.wxw-9527:MvpArms:1.0.9'
implementation 'com.github.wxw-9527:MvpArms:1.1.2'
}
```
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ android {
applicationId "com.rouxinpai.demo"
minSdk 21
targetSdk 33
versionCode 111
versionName "1.1.1"
versionCode 112
versionName "1.1.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ abstract class BaseApplication : Application(), IApplication {
}
}

override fun finishAllActivities() {
mActivities.forEach { activity -> activity.finish() }
}

override fun onActivityCreated(activity: Activity, savedInstanceState: Bundle?) {
addActivity(activity)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ interface IApplication : Application.ActivityLifecycleCallbacks {
*/
fun finishToActivity(cls: Class<*>)

/**
* 结束全部Activity
*/
fun finishAllActivities()

/**
* 登录超时
*/
Expand Down

0 comments on commit f0116d6

Please sign in to comment.