-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit 1.移除 Ktx ContentProvider ,改为手动初始化 2.提升RxHttp版本
- Loading branch information
hegaojian
committed
Jan 13, 2022
1 parent
200c937
commit db327c6
Showing
10 changed files
with
49 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="me.hgj.mvvmhelper"> | ||
<manifest package="me.hgj.mvvmhelper"> | ||
|
||
<application> | ||
<provider | ||
android:name=".base.Ktx" | ||
android:authorities="${applicationId}.KtxInstaller" | ||
android:exported="false" /> | ||
</application> | ||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package me.hgj.mvvmhelper.base | ||
|
||
import android.app.Application | ||
import me.hgj.mvvmhelper.util.KtxActivityLifecycleCallbacks | ||
import me.hgj.mvvmhelper.util.mvvmHelperLog | ||
|
||
/** | ||
* 作者 : hegaojian | ||
* 时间 : 2022/1/13 | ||
* 描述 : | ||
*/ | ||
|
||
/** | ||
* 全局上下文,可直接拿 | ||
*/ | ||
val appContext: Application by lazy { MvvmHelper.app } | ||
|
||
object MvvmHelper { | ||
|
||
lateinit var app: Application | ||
|
||
/** | ||
* 框架初始化 | ||
* @param application Application 全局上下文 | ||
* @param debug Boolean true为debug模式,会打印Log日志 false 关闭Log日志 | ||
*/ | ||
fun init(application: Application, debug: Boolean){ | ||
app = application | ||
mvvmHelperLog = debug | ||
//注册全局 activity生命周期监听 | ||
application.registerActivityLifecycleCallbacks(KtxActivityLifecycleCallbacks()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters