未验证 提交 903c8202 编写于 作者: O openharmony_ci 提交者: Gitee

!20657 翻译完成 20403+20519+19827+19834

Merge pull request !20657 from ester.zhou/TR-20403
......@@ -880,10 +880,8 @@ Indicates that the airplane mode of the device has changed.
- Required subscriber permissions: none
## COMMON_EVENT_SPLIT_SCREEN<sup>8+</sup>
## [COMMON_EVENT_SPLIT_SCREEN<sup>8+<sup>](./common_event/commonEvent-window.md)
Indicates that the screen has been split.
- Value: **usual.event.SPLIT_SCREEN**
- Required subscriber permissions: none
## COMMON_EVENT_SLOT_CHANGE<sup>9+</sup>
......@@ -907,3 +905,5 @@ Indicates the result of applying a quick fix to the application.
Indicates that the user information has been updated.
- Value: **usual.event.USER_INFO_UPDATED**
- Required subscriber permissions: none
## [COMMON_EVENT_SMS_RECEIVE_COMPLETED](./common_event/commonEvent-mms.md)
Indicates that a new SMS message has been received.
......@@ -31,6 +31,8 @@ import config from '@ohos.accessibility.config';
| shortkeyTarget | [Config](#config)\<string>| Yes| Yes| Target application for the accessibility extension shortcut key. The value format is 'bundleName/abilityName'.|
| captions | [Config](#config)\<boolean>| Yes| Yes| Whether to enable captions.|
| captionsStyle | [Config](#config)\<[accessibility.CaptionsStyle](js-apis-accessibility.md#captionsstyle8)>| Yes| Yes| Captions style.|
| audioMono| [Config](#config)\<boolean>| Yes| Yes| Whether to enable mono audio. The value **True** means to enable mono audio, and **False** means the opposite.|
| audioBalance| [Config](#config)\<number>| Yes| Yes| Audio balance for the left and right audio channels. The value ranges from -1.0 to 1.0.|
## enableAbility
......
......@@ -25,9 +25,9 @@ Implements initialization for the interpolation curve, which is used to create a
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | ----------------------------------------------- | ---- | ----------------------------------- |
| curve | [Curve](../arkui-ts/ts-appendix-enums.md#curve) | No | Curve type.<br>Default value: **Curve.Linear**|
| Name| Type | Mandatory| Description |
| ------ | --------------- | ---- | ----------------------------------- |
| curve | [Curve](#curve) | No | Curve type.<br>Default value: **Curve.Linear**|
**Return value**
......@@ -35,6 +35,28 @@ Implements initialization for the interpolation curve, which is used to create a
| ---------------------------------- | ---------------- |
| [ICurve](#icurve) | Interpolation curve.|
## Curve
Since API version 9, this API is supported in ArkTS widgets.
**System capability**: SystemCapability.ArkUI.ArkUI.Full
| Name | Description: |
| ------------------- | ------------------------------------------------------------ |
| Linear | The animation speed keeps unchanged. |
| Ease | The animation starts slowly, accelerates, and then slows down towards the end. The cubic-bezier curve (0.25, 0.1, 0.25, 1.0) is used.|
| EaseIn | The animation starts at a low speed and then picks up speed until the end. The cubic-bezier curve (0.42, 0.0, 1.0, 1.0) is used. |
| EaseOut | The animation ends at a low speed. The cubic-bezier curve (0.0, 0.0, 0.58, 1.0) is used. |
| EaseInOut | The animation starts and ends at a low speed. The cubic-bezier curve (0.42, 0.0, 0.58, 1.0) is used.|
| FastOutSlowIn | The animation uses the standard cubic-bezier curve (0.4, 0.0, 0.2, 1.0). |
| LinearOutSlowIn | The animation uses the deceleration cubic-bezier curve (0.0, 0.0, 0.2, 1.0). |
| FastOutLinearIn | The animation uses the acceleration cubic-bezier curve (0.4, 0.0, 1.0, 1.0). |
| ExtremeDeceleration | The animation uses the extreme deceleration cubic-bezier curve (0.0, 0.0, 0.0, 1.0). |
| Sharp | The animation uses the sharp cubic-bezier curve (0.33, 0.0, 0.67, 1.0). |
| Rhythm | The animation uses the rhythm cubic-bezier curve (0.7, 0.0, 0.2, 1.0). |
| Smooth | The animation uses the smooth cubic-bezier curve (0.4, 0.0, 0.4, 1.0). |
| Friction | The animation uses the friction cubic-bezier curve (0.2, 0.0, 0.2, 1.0). |
**Example**
```ts
......@@ -153,14 +175,14 @@ Creates a spring animation curve. If multiple spring animations are applied to t
| --------- | ------ | ---- | ----- |
| response | number | No | Duration of one complete oscillation.<br>Default value: **0.55**<br>Unit: second<br>Value range: [0, +∞)<br>**NOTE**<br>A value less than 0 evaluates to the default value **0.55**.|
| dampingFraction | number | No | Damping coefficient.<br>**0**: undamped. In this case, the spring oscillates forever.<br>> 0 and < 1: underdamped. In this case, the spring overshoots the equilibrium position.<br>**1**: critically damped.<br>> 1: overdamped. In this case, the spring approaches equilibrium gradually.<br>Default value: **0.825**<br>Unit: second<br>Value range: [0, +∞)<br>**NOTE**<br>A value less than 0 evaluates to the default value **0.55**.|
| overlapDuration | number | No | Duration for animations to overlap, in seconds. When animations overlap, if the **response** values of the two animations are different, they will transit smoothly over this duration.<br><br>Default value: **0**<br>Unit: second<br>Value range: [0, +∞)<br>**NOTE**<br>A value less than 0 evaluates to the default value **0**.<br>The spring animation curve is physics-based. Its duration depends on the **springMotion** parameters and the previous velocity, rather than the **duration** parameter in [animation](../arkui-ts/ts-animatorproperty.md) or [animateTo](../arkui-ts/ts-explicit-animation.md). The time cannot be normalized. Therefore, the interpolation cannot be obtained by using the **interpolate** function of the curve.|
| overlapDuration | number | No | Duration for animations to overlap, in seconds. When animations overlap, the **response** values of these animations will transit smoothly over this duration if they are different.<br>Default value: **0**<br>Unit: second<br>Value range: [0, +∞)<br>**NOTE**<br>A value less than 0 evaluates to the default value **0**.<br>The spring animation curve is physics-based. Its duration depends on the **springMotion** parameters and the previous velocity, rather than the **duration** parameter in [animation](../arkui-ts/ts-animatorproperty.md) or [animateTo](../arkui-ts/ts-explicit-animation.md). The time cannot be normalized. Therefore, the interpolation cannot be obtained using the **interpolate** function of the curve.|
**Return value**
| Type | Description |
| ---------------------------------- | ---------------- |
| [ICurve](#icurve)| Curve.<br>**NOTE**<br>The spring animation curve is physics-based. Its duration depends on the **springMotion** parameters and the previous velocity, rather than the **duration** parameter in [animation](../arkui-ts/ts-animatorproperty.md) or [animateTo](../arkui-ts/ts-explicit-animation.md). The time cannot be normalized. Therefore, the interpolation cannot be obtained by using the **interpolate** function of the curve.|
| [ICurve](#icurve)| Curve.<br>**NOTE**<br>The spring animation curve is physics-based. Its duration depends on the **springMotion** parameters and the previous velocity, rather than the **duration** parameter in [animation](../arkui-ts/ts-animatorproperty.md) or [animateTo](../arkui-ts/ts-explicit-animation.md). The time cannot be normalized. Therefore, the interpolation cannot be obtained using the [interpolate](#interpolate9) function of the curve.|
**Example**
......@@ -187,13 +209,13 @@ Creates a responsive spring animation curve. It is a special case of [springMoti
| --------- | ------ | ---- | ----- |
| response | number | No | See **response** in **springMotion**.<br>Default value: **0.15**<br>Unit: second<br>Value range: [0, +∞)<br>**NOTE**<br>A value less than 0 evaluates to the default value **0.15**.|
| dampingFraction | number | No | See **dampingFraction** in **springMotion**.<br>Default value: **0.86**<br>Unit: second<br>Value range: [0, +∞)<br>**NOTE**<br>A value less than 0 evaluates to the default value **0.86**.|
| overlapDuration | number | No | See **overlapDuration** in **springMotion**.<br>Default value: **0.25**<br>Unit: second<br>Value range: [0, +∞)<br>**NOTE**<br>A value less than 0 evaluates to the default value **0.25**.<br> To apply custom settings for a spring animation, you are advised to use **springMotion**. When using **responsiveSpringMotion**, you are advised to retain the default settings.<br>The duration of the responsive spring animation depends on the **responsiveSpringMotion** parameters and the previous velocity, rather than the **duration** parameter in [animation](../arkui-ts/ts-animatorproperty.md) or [animateTo](../arkui-ts/ts-explicit-animation.md). In addition, the interpolation cannot be obtained by using the **interpolate** function of the curve.|
| overlapDuration | number | No | See **overlapDuration** in **springMotion**.<br>Default value: **0.25**<br>Unit: second<br>Value range: [0, +∞)<br>**NOTE**<br>A value less than 0 evaluates to the default value **0.25**.<br> To apply custom settings for a spring animation, you are advised to use **springMotion**. When using **responsiveSpringMotion**, you are advised to retain the default settings.<br>The duration of the responsive spring animation depends on the **responsiveSpringMotion** parameters and the previous velocity, rather than the **duration** parameter in [animation](../arkui-ts/ts-animatorproperty.md) or [animateTo](../arkui-ts/ts-explicit-animation.md). In addition, the interpolation cannot be obtained using the **interpolate** function of the curve. |
**Return value**
| Type | Description |
| ---------------------------------- | ---------------- |
| [ICurve](#icurve)| Curve.<br>**NOTE**<br>1. To apply custom settings for a spring animation, you are advised to use **springMotion**. When using **responsiveSpringMotion**, you are advised to retain the default settings.<br>2. The duration of the responsive spring animation depends on the **responsiveSpringMotion** parameters and the previous velocity, rather than the **duration** parameter in **animation** or **animateTo**. In addition, the interpolation cannot be obtained by using the [interpolate](#interpolate9) function of the curve.|
| [ICurve](#icurve)| Curve.<br>**NOTE**<br>1. To apply custom settings for a spring animation, you are advised to use **springMotion**. When using **responsiveSpringMotion**, you are advised to retain the default settings.<br>2. The duration of the responsive spring animation depends on the **responsiveSpringMotion** parameters and the previous velocity, rather than the **duration** parameter in **animation** or **animateTo**. In addition, the interpolation cannot be obtained using the [interpolate](#interpolate9) function of the curve.|
**Example**
......@@ -310,9 +332,9 @@ Implements initialization to create a curve. This API is deprecated since API ve
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | ----------------------------------------------- | ---- | ----------------------------------- |
| curve | [Curve](../arkui-ts/ts-appendix-enums.md#curve) | No | Curve type.<br>Default value: **Curve.Linear**|
| Name| Type | Mandatory| Description |
| ------ | --------------- | ---- | ----------------------------------- |
| curve | [Curve](#curve) | No | Curve type.<br>Default value: **Curve.Linear**|
## Curves.steps<sup>(deprecated)</sup>
......
......@@ -6,8 +6,6 @@ The **font** module provides APIs for registering custom fonts.
>
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
>
> The APIs provided by this module are system APIs.
>
> The functionality of this module depends on UI context. This means that the APIs of this module cannot be used where the UI context is unclear. For details, see [UIContext](./js-apis-arkui-UIContext.md#uicontext).
>
> Since API version 10, you can use the [getFont](./js-apis-arkui-UIContext.md#getfont) API in [UIContext](./js-apis-arkui-UIContext.md#uicontext) to obtain the [Font](./js-apis-arkui-UIContext.md#font) object associated with the current UI context.
......@@ -38,8 +36,8 @@ Registers a custom font with the font manager.
| Name | Type | Mandatory | Description |
| ---------- | ------ | ---- | ------------ |
| familyName | string | Yes | Name of the custom font to register. |
| familySrc | string | Yes | Path of the custom font to register.|
| familyName | string \| [Resource](../arkui-ts/ts-types.md#resource)<sup>10+</sup> | Yes | Name of the custom font to register. |
| familySrc | string \| [Resource](../arkui-ts/ts-types.md#resource)<sup>10+</sup> | Yes | Path of the custom font to register.|
**Example**
......@@ -53,10 +51,23 @@ struct FontExample {
@State message: string =' Hello, World'
aboutToAppear() {
// Both familyName and familySrc support the string type.
font.registerFont({
familyName: 'medium',
familySrc: '/font/medium.ttf'
})
// Both familyName and familySrc support the Resource type.
font.registerFont({
familyName: $r('app.string.mediumFamilyName'),
familySrc: $r('app.string.mediumFamilySrc')
})
// familySrc supports the $rawfile type.
font.registerFont({
familyName: 'mediumRawFile',
familySrc: $rawfile('font/medium.ttf')
})
}
build() {
......@@ -64,7 +75,7 @@ struct FontExample {
Text(this.message)
.align(Alignment.Center)
.fontSize(20)
.fontFamily('medium') // medium: name of the custom font to register.
.fontFamily('medium') // medium: name of the custom font to register. (Registered fonts such as $r('app.string.mediumFamilyName') and 'mediumRawFile' can also be used.)
.height('100%')
}.width('100%')
}
......
......@@ -10,7 +10,7 @@ Provides the bundle information of an application.
**System capability**: SystemCapability.Notification.Notification
| Name | Type | Read-only| Mandatory| Description |
| ------ | ------ | ---- | ---- | ------ |
| bundle | string | No | Yes| Bundle information of the application.|
| uid | number | No | No| User ID.|
| Name | Type | Mandatory| Description |
| ------ | ------ | ------ | ------ |
| bundle | string | Yes| Bundle information of the application.|
| uid | number | No| User ID.|
......@@ -100,7 +100,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/
```ts
// NotificationRequest object
let notificationRequest: notificationManager.NotificationRequest = {
notificationId: 1,
id: 1,
content: {
contentType: notificationManager.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT,
normal: {
......@@ -217,7 +217,7 @@ For details about the error codes, see [Notification Error Codes](../errorcodes/
```ts
let notificationRequest: notificationManager.NotificationRequest = {
notificationId: 1,
id: 1,
content: {
contentType: notificationManager.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT,
normal: {
......@@ -3947,11 +3947,11 @@ try{
**System API**: This is a system API and cannot be called by third-party applications.
| Name | Type | Read-only| Mandatory| Description |
| ----- | ------------------------------------- | ---- | ---- | ---------------------- |
| type | [DoNotDisturbType](#donotdisturbtype) | No | Yes | DND time type.|
| begin | Date | No | Yes | DND start time.|
| end | Date | No | Yes | DND end time.|
| Name | Type | Mandatory| Description |
| ----- | ------------------------------------- | ---- | ---------------------- |
| type | [DoNotDisturbType](#donotdisturbtype) | Yes | DND time type.|
| begin | Date | Yes | DND start time.|
| end | Date | Yes | DND end time.|
## DoNotDisturbType
......@@ -4041,11 +4041,11 @@ try{
**Required permissions**: ohos.permission.NOTIFICATION_CONTROLLER, ohos.permission.NOTIFICATION_AGENT_CONTROLLER
| Name | Type | Read-only| Mandatory| Description |
| ----- | ------------------------------------- | ---- | ---- | ---------------------- |
| bundleName | string | No | Yes | Bundle name.|
| notificationId | number | No | Yes | Notification ID. |
| contentType | [ContentType](#contenttype) | No | Yes | Notification type. |
| Name | Type | Mandatory| Description |
| ----- | ------------------------------------- | --- | ---------------------- |
| bundleName | string | Yes | Bundle name.|
| notificationId | number | Yes | Notification ID. |
| contentType | [ContentType](#contenttype) | Yes | Notification type. |
## NotificationCheckResult<sup>10+</sup>
......@@ -4055,7 +4055,7 @@ try{
**Required permissions**: ohos.permission.NOTIFICATION_CONTROLLER, ohos.permission.NOTIFICATION_AGENT_CONTROLLER
| Name | Type | Read-only| Mandatory| Description |
| ----- | ------------------------------------- | ---- | ---- | ---------------------- |
| code | number | No | Yes | Result code.<br>**0**: display.<br>**1**: no display.|
| message | string | No | Yes | Result. |
| Name | Type | Mandatory| Description |
| ------- | ------------------------------------ | ---- | ---------------------- |
| code | number | Yes | Result code.<br>**0**: display.<br>**1**: no display.|
| message | string | Yes | Result. |
......@@ -665,10 +665,12 @@ notificationSubscribe.removeAll(userId, removeAllCallback);
**System capability**: SystemCapability.Notification.Notification
| Name | Type | Read-only| Mandatory| Description |
| ----- | ------ | ---- | --- | -------- |
| id | number | No | Yes | Notification ID. |
| label | string | No | No | Notification label.|
**System API**: This is a system API and cannot be called by third-party applications.
| Name | Type | Mandatory| Description |
| ----- | ------ | --- | -------- |
| id | number | Yes | Notification ID. |
| label | string | No | Notification label.|
## RemoveReason
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册