diff --git a/interfaces/kits/ani/window_runtime/window_stage_ani/ets/@ohos.window.ets b/interfaces/kits/ani/window_runtime/window_stage_ani/ets/@ohos.window.ets index 9be0fe0db669ec9f8d9280d6ecb2053cd1551f87..adb2bf88227c4828a73b5e2ecc265343d5f441d7 100644 --- a/interfaces/kits/ani/window_runtime/window_stage_ani/ets/@ohos.window.ets +++ b/interfaces/kits/ani/window_runtime/window_stage_ani/ets/@ohos.window.ets @@ -25,7 +25,7 @@ export type WindowEventCallback = (data: window.WindowEventType) => void; export type WindowRectCallback = (data: window.Rect) => void; export type WindowSizeCallback = (data: window.Size) => void; export type WindowStatusCallback = (data: window.WindowStatusType) => void; -export type KeyboardHeightChangeCallback = (data: number) => void; +export type KeyboardHeightChangeCallback = (data: int) => void; export type KeyboardDidShowOrHideCallback = (data: window.KeyboardInfo) => void; export type WindowVoidCallback = () => void; const DOMAIN = 0x4200; @@ -3155,9 +3155,9 @@ function runWindowSizeCallback(cb: object, cbArg: object): void { func(cbArg as Size); } -function runKeyboardHeightChangeCallback(cb: object, cbArg: number): void { - const func = cb as (cbArg: number) => void; - func(cbArg as number); +function runKeyboardHeightChangeCallback(cb: object, cbArg: int): void { + const func = cb as (cbArg: int) => void; + func(cbArg as int); } function runKeyboardDidShowCallback(cb: object, cbArg: object): void { diff --git a/interfaces/kits/ani/window_runtime/window_stage_ani/src/ani_window_listener.cpp b/interfaces/kits/ani/window_runtime/window_stage_ani/src/ani_window_listener.cpp index 34f512a69c890b9e5988b9340dd37f0317378614..355956f3718c2bd560c3f7820c33b56ebce03983 100644 --- a/interfaces/kits/ani/window_runtime/window_stage_ani/src/ani_window_listener.cpp +++ b/interfaces/kits/ani/window_runtime/window_stage_ani/src/ani_window_listener.cpp @@ -245,7 +245,7 @@ void AniWindowListener::OnSizeChange(const sptr& info, return; } AniWindowUtils::CallAniFunctionVoid(env_, "L@ohos/window/window;", "runKeyboardHeightChangeCallback", - nullptr, thisListener->aniCallback_, static_cast(info->rect_.height_)); + nullptr, thisListener->aniCallback_, static_cast(info->rect_.height_)); } void AniWindowListener::OnKeyboardDidShow(const KeyboardPanelInfo& keyboardPanelInfo)