Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
3e0d4cd1
D
Docs
项目概览
OpenHarmony
/
Docs
1 年多 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
3e0d4cd1
编写于
1月 31, 2023
作者:
G
Gloria
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update docs against 13383+13602+13548
Signed-off-by: wusongqing<wusongqing@huawei.com>
上级
e81e96fa
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
12 addition
and
15 deletion
+12
-15
en/application-dev/windowmanager/application-window-fa.md
en/application-dev/windowmanager/application-window-fa.md
+1
-1
en/application-dev/windowmanager/application-window-stage.md
en/application-dev/windowmanager/application-window-stage.md
+10
-11
en/application-dev/windowmanager/system-window-stage.md
en/application-dev/windowmanager/system-window-stage.md
+1
-3
未找到文件。
en/application-dev/windowmanager/application-window-fa.md
浏览文件 @
3e0d4cd1
...
...
@@ -52,7 +52,7 @@ You can create a subwindow, such as a dialog box, and set its properties.
let
windowClass
=
null
;
// Method 1: Create a subwindow.
let
config
=
{
name
:
"
subWindow
"
,
windowType
:
window
.
WindowType
.
TYPE_APP
,
ctx
:
this
.
context
};
let
config
=
{
name
:
"
subWindow
"
,
windowType
:
window
.
WindowType
.
TYPE_APP
};
window
.
createWindow
(
config
,
(
err
,
data
)
=>
{
if
(
err
.
code
)
{
console
.
error
(
'
Failed to create the subWindow. Cause:
'
+
JSON
.
stringify
(
err
));
...
...
en/application-dev/windowmanager/application-window-stage.md
浏览文件 @
3e0d4cd1
...
...
@@ -67,9 +67,9 @@ In the stage model, the main window of an application is created and maintained
Call
**loadContent**
to load the page content to the main window.
```
ts
import
Ability
from
'
@ohos.application.Ability
'
import
UIAbility
from
'
@ohos.app.ability.UIAbility
'
;
class
MainAbility
extends
Ability
{
export
default
class
EntryAbility
extends
UI
Ability
{
onWindowStageCreate
(
windowStage
)
{
// 1. Obtain the main window of the application.
let
windowClass
=
null
;
...
...
@@ -127,11 +127,11 @@ You can create an application subwindow, such as a dialog box, and set its prope
When the subwindow is no longer needed, you can call
**destroyWindow**
to destroy it.
```
ts
import
Ability
from
'
@ohos.application.Ability
'
import
UIAbility
from
'
@ohos.app.ability.UIAbility
'
;
let
windowStage_
=
null
;
let
sub_windowClass
=
null
;
class
MainAbility
extends
Ability
{
export
default
class
EntryAbility
extends
UI
Ability
{
showSubWindow
()
{
// 1. Create a subwindow.
windowStage_
.
createSubWindow
(
"
mySubWindow
"
,
(
err
,
data
)
=>
{
...
...
@@ -220,9 +220,9 @@ To create a better video watching and gaming experience, you can use the immersi
Call
**loadContent**
to load the content to the immersive window.
```
ts
import
Ability
from
'
@ohos.application.Ability
'
import
UIAbility
from
'
@ohos.app.ability.UIAbility
'
;
class
MainAbility
extends
Ability
{
export
default
class
EntryAbility
extends
UI
Ability
{
onWindowStageCreate
(
windowStage
)
{
// 1. Obtain the main window of the application.
let
windowClass
=
null
;
...
...
@@ -303,7 +303,7 @@ A floating window is created based on an existing task. It is always displayed i
"name"
:
"ohos.permission.SYSTEM_FLOAT_WINDOW"
,
"usedScene"
:
{
"abilities"
:
[
"
Main
Ability"
"
Entry
Ability"
],
"when"
:
"inuse"
}
...
...
@@ -330,11 +330,11 @@ A floating window is created based on an existing task. It is always displayed i
When the floating window is no longer needed, you can call
**destroyWindow**
to destroy it.
```
ts
import
Ability
from
'
@ohos.application.Ability
'
import
ExtensionContext
from
'
@ohos.app
lication
.ServiceExtensionAbility
'
;
import
UIAbility
from
'
@ohos.app.ability.UIAbility
'
;
import
ExtensionContext
from
'
@ohos.app
.ability
.ServiceExtensionAbility
'
;
import
window
from
'
@ohos.window
'
;
class
MainAbility
extends
Ability
{
export
default
class
EntryAbility
extends
UI
Ability
{
onWindowStageCreate
(
windowStage
)
{
// 2. Create a floating window.
let
windowClass
=
null
;
...
...
@@ -390,4 +390,3 @@ A floating window is created based on an existing task. It is always displayed i
};
```
<!--no_check-->
\ No newline at end of file
en/application-dev/windowmanager/system-window-stage.md
浏览文件 @
3e0d4cd1
...
...
@@ -58,12 +58,11 @@ This section uses the volume bar as an example to describe how to develop a syst
When the volume bar window is no longer needed, you can call
**hide**
or
**destroyWindow**
to hide or destroy it.
```
ts
import
ExtensionContext
from
'
@ohos.app
lication
.ServiceExtensionAbility
'
;
import
ExtensionContext
from
'
@ohos.app
.ability
.ServiceExtensionAbility
'
;
import
window
from
'
@ohos.window
'
;
export
default
class
ServiceExtensionAbility1
extends
ExtensionContext
{
onCreate
(
want
)
{
console
.
log
(
"
[Demo] MainAbility onCreate
"
)
globalThis
.
abilityWant
=
want
;
// 1. Create a volume bar window.
let
windowClass
=
null
;
...
...
@@ -151,7 +150,6 @@ import window from '@ohos.window';
export
default
class
ServiceExtensionAbility1
extends
ExtensionContext
{
onCreate
(
want
)
{
console
.
log
(
"
[Demo] MainAbility onCreate
"
)
globalThis
.
abilityWant
=
want
;
// Create a volume bar window.
let
windowClass
=
null
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录