未验证 提交 3a3aff6c 编写于 作者: 邹伟 提交者: Gitee

update zh-cn/application-dev/reference/apis/js-apis-windowAnimationManager.md.

Modify: Modify the doc of WindowAnimationManager
Signed-off-by: N邹伟 <1328075141@qq.com>
上级 add425c8
......@@ -61,7 +61,7 @@ let controller = {
console.log('onScreenUnlock called');
finishCallback.onAnimationFinish();
},
onWindowAnimationTargetsUpdate(fullScreenWindowTarget: windowAnimationManager.WindowAnimationTarget, floatingWindowTargets: Array<windowAnimationManager.WindowAnimationTarget>): void{
onWindowAnimationTargetsUpdate(fullScreenWindowTarget: windowAnimationManager.WindowAnimationTarget, floatingWindowTargets: Array<windowAnimationManager.WindowAnimationTarget>): void {
console.log('onWindowAnimationTargetsUpdate, the fullScreenWindowTarget is: ' + fullScreenWindowTarget);
console.log('onWindowAnimationTargetsUpdate, the floatingWindowTargets are: ' + floatingWindowTargets);
}
......@@ -83,7 +83,7 @@ minimizeWindowWithAnimation(windowTarget: WindowAnimationTarget, callback: Async
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| windowTarget | [WindowAnimationTarget](#windowanimationtarget) | 是 | 动画目标窗口。|
| callback | AsyncCallback&lt;[WindowAnimationFinishedCallback](#windowanimationfinishedcallback)&gt; | 是 | 动画完成后的回调。|
| callback | AsyncCallback&lt;[WindowAnimationFinishedCallback](#windowanimationfinishedcallback)&gt; | 是 | 回调函数。当最小化动画目标窗口成功,err为undefined,data为获取到的WindowAnimationFinishedCallback;否则返回err.code为-1,data为undefined。|
**示例:**
......@@ -92,42 +92,49 @@ let target: WindowAnimationTarget = undefined;
let controller = {
onStartAppFromLauncher(startingWindowTarget: windowAnimationManager.WindowAnimationTarget, finishCallback: windowAnimationManager.WindowAnimationFinishedCallback): void {
console.log('onStartAppFromLauncher, the startingWindowTarget is: ' + startingWindowTarget);
target = startingWindowTarget;
finishCallback.onAnimationFinish();
},
onStartAppFromRecent(startingWindowTarget: windowAnimationManager.WindowAnimationTarget, finishCallback: windowAnimationManager.WindowAnimationFinishedCallback): void {
console.log('onStartAppFromRecent, the startingWindowTarget is: ' + startingWindowTarget);
target = startingWindowTarget;
finishCallback.onAnimationFinish();
},
onStartAppFromOther(startingWindowTarget: windowAnimationManager.WindowAnimationTarget, finishCallback: windowAnimationManager.WindowAnimationFinishedCallback): void {
console.log('onStartAppFromOther, the startingWindowTarget is: ' + startingWindowTarget);
target = startingWindowTarget;
finishCallback.onAnimationFinish();
},
onAppTransition(fromWindowTarget: windowAnimationManager.WindowAnimationTarget, toWindowTarget: WindowAnimationTarget, finishCallback: windowAnimationManager.WindowAnimationFinishedCallback): void {
console.log('onAppTransition, the fromWindowTarget is: ' + fromWindowTarget);
console.log('onAppTransition, the toWindowTarget is: ' + toWindowTarget);
target = toWindowTarget;
finishCallback.onAnimationFinish();
},
onMinimizeWindow(minimizingWindowTarget: windowAnimationManager.WindowAnimationTarget, finishCallback: windowAnimationManager.WindowAnimationFinishedCallback): void {
console.log('onMinimizeWindow, the minimizingWindowTarget is: ' + minimizingWindowTarget);
target = minimizingWindowTarget;
finishCallback.onAnimationFinish();
},
onCloseWindow(closingWindowTarget: windowAnimationManager.WindowAnimationTarget, finishCallback: windowAnimationManager.WindowAnimationFinishedCallback): void {
console.log('onCloseWindow, the closingWindowTarget is: ' + closingWindowTarget);
target = closingWindowTarget;
finishCallback.onAnimationFinish();
},
onScreenUnlock(finishCallback: windowAnimationManager.WindowAnimationFinishedCallback): void {
console.log('onScreenUnlock called');
finishCallback.onAnimationFinish();
},
onWindowAnimationTargetsUpdate(fullScreenWindowTarget: windowAnimationManager.WindowAnimationTarget, floatingWindowTargets: Array<windowAnimationManager.WindowAnimationTarget>): void{
onWindowAnimationTargetsUpdate(fullScreenWindowTarget: windowAnimationManager.WindowAnimationTarget, floatingWindowTargets: Array<windowAnimationManager.WindowAnimationTarget>): void {
console.log('onWindowAnimationTargetsUpdate, the fullScreenWindowTarget is: ' + fullScreenWindowTarget);
console.log('onWindowAnimationTargetsUpdate, the floatingWindowTargets are: ' + floatingWindowTargets);
target = fullScreenWindowTarget;
}
}
windowAnimationManager.setController(controller)
let finishedCallback = null;
let finishedCallback: windowAnimationManager.WindowAnimationFinishedCallback = undefined;
windowAnimationManager.minimizeWindowWithAnimation(target, (err, data) => {
if (err.code) {
console.error('Failed to minimize the window target. Cause: ' + JSON.stringify(err));
......@@ -195,7 +202,7 @@ let controller = {
console.log('onScreenUnlock called');
finishCallback.onAnimationFinish();
},
onWindowAnimationTargetsUpdate(fullScreenWindowTarget: windowAnimationManager.WindowAnimationTarget, floatingWindowTargets: Array<windowAnimationManager.WindowAnimationTarget>): void{
onWindowAnimationTargetsUpdate(fullScreenWindowTarget: windowAnimationManager.WindowAnimationTarget, floatingWindowTargets: Array<windowAnimationManager.WindowAnimationTarget>): void {
console.log('onWindowAnimationTargetsUpdate, the fullScreenWindowTarget is: ' + fullScreenWindowTarget);
console.log('onWindowAnimationTargetsUpdate, the floatingWindowTargets are: ' + floatingWindowTargets);
}
......@@ -348,7 +355,7 @@ onWindowAnimationTargetsUpdate(fullScreenWindowTarget: WindowAnimationTarget, fl
| 参数名 | 类型 | 必填 | 说明 |
| -------------------- | ------------------------------- | ---- | ---------------- |
| fullScreenWindowTarget | [WindowAnimationTarget](#windowanimationtarget) | 是 | 全屏状态的动画目标窗口。|
| floatingWindowTargets| Array&lt;[WindowAnimationTarget](#windowanimationtarget)&gt; | 是 | 悬浮状态的动画目标窗口 |
| floatingWindowTargets| Array&lt;[WindowAnimationTarget](#windowanimationtarget)&gt; | 是 | 悬浮状态的动画目标窗口 |
**示例:**
......@@ -379,7 +386,7 @@ onAnimationFinish():void
| bundleName | string | 动画目标窗口所对应的包名。 |
| abilityName | string | 动画目标窗口所对应的Ability名称。 |
| windowBounds | [RRect](#rrect) | 动画目标窗口所对应的实际大小。 |
| missionId | number | 任务ID。|
| missionId | number | 任务ID,多任务中用于与ability进行匹配。|
## RRect
圆角矩形。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册