Added configuration params in Context.applyTheme in YukiHookFactory and ModuleContextThemeWrapper

This commit is contained in:
2022-08-24 00:22:49 +08:00
parent 6448af1e0e
commit 55b0699882
5 changed files with 90 additions and 13 deletions

View File

@@ -0,0 +1,31 @@
## ModuleContextThemeWrapper *- class*
```kotlin
class ModuleContextThemeWrapper private constructor(baseContext: Context, theme: Int, configuration: Configuration?) : ContextThemeWrapper
```
**变更记录**
`v1.0.93` `新增`
**功能描述**
> 代理 `ContextThemeWrapper`。
通过包装,你可以轻松在 (Xposed) 宿主环境使用来自模块的主题资源。
### applyConfiguration *- method*
```kotlin
fun applyConfiguration(initiate: Configuration.() -> Unit): ModuleContextThemeWrapper
```
**变更记录**
`v1.0.93` `新增`
**功能描述**
> 设置当前 `ModuleContextThemeWrapper` 的 `Configuration`。
设置后会自动调用 `Resources.updateConfiguration`