mirror of
https://gitee.com/openharmony/applications_app_samples
synced 2025-02-17 02:08:44 +00:00
!4942 【Sample】修复JsDistributedMusicPlayer、ArkTSClock、AppMarket应用readme断链
Merge pull request !4942 from 张宏/1115
This commit is contained in:
commit
34512ecf3a
@ -32,7 +32,7 @@ entry/src/main/ets/
|
||||
* 本示例展示简单时钟的方法主要封装在Index中,源码参考:[Index.ets](entry/src/main/ets/pages/Index.ets) 。
|
||||
* 设置表盘大小:通过Index中的display.getDefaultDisplay()方法来获取设备宽高计算表盘大小;
|
||||
* 获取当前时间:调用updateTime函数,执行new Date().getHours()、new Date().getMinutes()、new Date().getSeconds()获取当前时间。
|
||||
* 绘制表盘内容:通过[CanvasRenderingContext2D](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/arkui-ts/ts-canvasrenderingcontext2d.md) 来画表盘背景、时针、分针、秒针、圆心以及表盘下方文本;
|
||||
* 绘制表盘内容:通过[CanvasRenderingContext2D](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-canvasrenderingcontext2d.md) 来画表盘背景、时针、分针、秒针、圆心以及表盘下方文本;
|
||||
* 启动时钟:添加setInterval定时器,每隔1s执行一次updateTime函数。
|
||||
|
||||
### 相关权限
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
文件存储管理能力接口[@ohos.fileio](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-core-file-kit/js-apis-fileio.md)
|
||||
|
||||
屏幕属性接口[@ohos.display](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-display.md#displaygetdefaultdisplaydeprecated)
|
||||
屏幕属性接口[@ohos.display](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-arkui/js-apis-display.md)
|
||||
|
||||
管理窗口能力接口[@ohos.window](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-arkui/js-apis-window.md)
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
本示例使用[一次开发多端部署](https://gitee.com/openharmony/docs/tree/master/zh-cn/application-dev/key-features/multi-device-app-dev)中介绍的自适应布局能力和响应式布局能力进行多设备(或多窗口尺寸)适配,保证应用在不同设备或不同窗口尺寸下可以正常显示。
|
||||
|
||||
用到了媒体查询接口[@ohos.mediaquery](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-mediaquery.md)。
|
||||
用到了媒体查询接口[@ohos.mediaquery](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-arkui/js-apis-mediaquery.md)。
|
||||
|
||||
### 效果预览
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user