• Home
Name Date Size #Lines LOC

..--

AppScope/12-May-2024-3633

entry/12-May-2024-719565

screenshots/devices/12-May-2024-

.gitignoreD12-May-2024121 88

README.mdD12-May-20241 KiB3417

README_zh.mdD12-May-20241.7 KiB4928

build-profile.json5D12-May-20241 KiB4341

hvigorfile.jsD12-May-2024168 21

package.jsonD12-May-2024394 2019

README.md

1# Window
2
3### Introduction
4
5This sample shows how to create a window and display an app in a floating window or split-screen mode.
6
7### How to Use
8
91. Start the sample app, touch a video to play it, and touch the video again to pause the playback.
10
112. On the top of the app, slide down to display the window.
12
133. Touch the split-screen icon to display the app in split-screen mode. Touch the icon again to exit the split-screen mode.
14
15![splitScreen.gif](splitScreen.gif)
16
174. Touch the floating icon to display the app in a floating window. Touch the icon again to cancel the floating display.
18
19![hangingWindow.gif](hangingWindow.gif)
20
215. Touch the minus sign icon to minimize the app. Touch the app to display it again.
22
23![minimize.gif](minimize.gif)
24
256. Touch the close icon to close the app.
26
27### Constraints
28
291. This sample can only be run on standard-system devices.
30
312. This sample demonstrates the stage model, which supports only API version 9.
32
333. This sample requires DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022) to compile and run.
34

README_zh.md

1# 窗口
2
3### 简介
4
5本示例展示了创建新窗口,将应用悬浮在其他界面,及应用分屏等功能。效果图如下:
6![](screenshots/devices/index.png) ![](screenshots/devices/main.png)
7
8### 相关概念
9
10窗口:窗口提供管理窗口的一些基础能力,包括对当前窗口的创建、销毁、各属性设置,以及对各窗口间的管理调度。
11
12### 相关权限
13
14不涉及。
15
16### 使用说明
17
181.启动应用,点击视频可播放视频,再次点击视频暂停。
19
202.在应用顶部,下滑出现窗口操作。
21
223.点击分屏图标,将应用上下分屏,再次点击取消分屏显示。
23
24![splitScreen.gif](splitScreen.gif)
25
264.点击悬浮图标,将应用悬浮展示在其他界面上,再次点击取消悬浮显示。
27
28![hangingWindow.gif](hangingWindow.gif)
29
305.点击减号按钮,将应用最小化,再次点击应用,应用显示。
31
32![minimize.gif](minimize.gif)
33
346.点击关闭按钮,关闭应用。
35
36### 约束与限制
37
381.本示例仅支持标准系统上运行。
39
402.本示例为stage模型,从API version 9开始支持。
41
423.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。
43
444.本实例在RK板上运行需要修改RK文件才能使用应用窗口能力,操作如下:
45使用hdc file recv system/etc/window/resources/window_manager_config.xml C:\   将系统文件拉取到C盘;
46将文件中<decor enable="false"></decor>改为<decor enable="true"></decor>;
47使用hdc shell mount -o rw,remount /   修改文件读写权限;
48使用hdc file send C:\window_manager_config.xml system/etc/window/resources/window_manager_config.xml   替换系统文件;
49重启RK。