---
pageClass: code-page
---

::: warning

Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.

:::

::: warning

The English translation of this page has not been completed, you are welcome to contribute translations to us.

You can use the **Chrome Translation Plugin** to translate entire pages for reference.

:::

# ModuleAppCompatActivity <span class="symbol">- class</span>

```kotlin:no-line-numbers
open class ModuleAppCompatActivity : AppCompatActivity()
```

**Change Records**

`v1.1.0` `added`

**Function Illustrate**

> 代理 `AppCompatActivity`。

继承于此类的 `Activity` 可以同时在宿主与模块中启动。

在 (Xposed) 宿主环境需要在宿主启动时调用 `Context.registerModuleAppActivities` 进行注册。

在 (Xposed) 宿主环境需要重写 `moduleTheme` 设置 AppCompat 主题，否则会无法启动。

## moduleTheme <span class="symbol">- field</span>

```kotlin:no-line-numbers
open val moduleTheme: Int
```

**Change Records**

`v1.1.0` `added`

**Function Illustrate**

> 设置当前代理的 `Activity` 主题。

## proxyClassName <span class="symbol">- field</span>

```kotlin:no-line-numbers
open val proxyClassName: String
```

**Change Records**

`v1.1.10` `added`

**Function Illustrate**

> 设置当前代理的 `Activity` 类名。

留空则使用 `Context.registerModuleAppActivities` 时设置的类名

::: danger

代理的 **Activity** 类名必须存在于宿主的 AndroidMainifest 清单中。

:::