Modify add isUseNewConfig in YukiHookFactory and ModuleContextThemeWrapper

This commit is contained in:
2022-08-20 02:48:30 +08:00
parent e0e5cd7fd2
commit b982d1fd03
3 changed files with 18 additions and 7 deletions

View File

@@ -340,7 +340,7 @@ context.startActivity(context, HostTestActivity::class.java)
### Context.applyTheme *- ext-method*
```kotlin
fun Context.applyTheme(theme: Int): ModuleContextThemeWrapper
fun Context.applyTheme(theme: Int, isUseNewConfig: Boolean): ModuleContextThemeWrapper
```
**变更记录**
@@ -353,6 +353,8 @@ fun Context.applyTheme(theme: Int): ModuleContextThemeWrapper
在 Hook APP (宿主) 中使用此方法会自动调用 `injectModuleAppResources` 注入当前 Xposed 模块的资源。
如果在 Hook APP (宿主) 中使用此方法发生 `ClassCastException`,请设置 `isUseNewConfig``true`
为防止资源 ID 互相冲突,你需要在当前 Xposed 模块项目的 `build.gradle` 中修改资源 ID。
- Kotlin Gradle DSL