diff --git a/en/react-native-keyboard-controller.md b/en/react-native-keyboard-controller.md index fd3a68b1ae656f97e5efbc8d72677fd011f9bd79..39559676035e5374f0d9b2953a7200cc9dc4ba58 100644 --- a/en/react-native-keyboard-controller.md +++ b/en/react-native-keyboard-controller.md @@ -192,7 +192,7 @@ Method 2: Directly link to the source code. > [!TIP] For details, see [Directly Linking Source Code](/en/link-source-code.md). -### 3. Configuring CMakeLists and Introducing RNKeyboardControllerPackage and RNStatusBarManagerCompatPackage +### 3. Configuring CMakeLists and Introducing RNKeyboardControllerPackage > If you are using version <= 1.12.7-0.0.5, please skip this chapter. @@ -253,18 +253,17 @@ std::vector> PackageProvider::getPackages(Package::Cont } ``` -### 4. Introducing RNKeyboardControllerPackage and RNStatusBarManagerCompatPackage to ArkTS +### 4. Introducing RNKeyboardControllerPackage to ArkTS Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: ```diff -+ import {RNKeyboardControllerPackage,RNStatusBarManagerCompatPackage} from "@react-native-ohos/react-native-keyboard-controller/ts"; ++ import {RNKeyboardControllerPackage} from "@react-native-ohos/react-native-keyboard-controller/ts"; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ new SamplePackage(ctx), -+ new RNKeyboardControllerPackage(ctx), -+ new RNStatusBarManagerCompatPackage(ctx) ++ new RNKeyboardControllerPackage(ctx) ]; } ``` diff --git a/zh-cn/react-native-keyboard-controller.md b/zh-cn/react-native-keyboard-controller.md index 9d2db61c3cbe6d67d655a1d5c20503b686026f8e..c61ae4731b863104ddbefe24df5e3db7a2e750ac 100644 --- a/zh-cn/react-native-keyboard-controller.md +++ b/zh-cn/react-native-keyboard-controller.md @@ -179,7 +179,7 @@ ohpm install > [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) -### 3. 配置 CMakeLists 和引入 RNKeyboardControllerPackage,RNStatusBarManagerCompatPackage +### 3. 配置 CMakeLists 和引入 RNKeyboardControllerPackage > 若使用的是 <= 1.12.7-0.0.5 版本,请跳过本章 @@ -242,18 +242,17 @@ std::vector> PackageProvider::getPackages(Package::Cont } ``` -### 4. 在 ArkTs 侧引入 RNKeyboardControllerPackage,RNStatusBarManagerCompatPackage +### 4. 在 ArkTs 侧引入 RNKeyboardControllerPackage 打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: ```diff -+ import {RNKeyboardControllerPackage,RNStatusBarManagerCompatPackage} from "@react-native-ohos/react-native-keyboard-controller/ts"; ++ import {RNKeyboardControllerPackage} from "@react-native-ohos/react-native-keyboard-controller/ts"; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ new SamplePackage(ctx), -+ new RNKeyboardControllerPackage(ctx), -+ new RNStatusBarManagerCompatPackage(ctx) ++ new RNKeyboardControllerPackage(ctx) ]; } ```