提交 5980dc33 编写于 作者: G Gloria

Update docs against 14784+14482

Signed-off-by: wusongqing<wusongqing@huawei.com>
上级 080bf723
...@@ -724,8 +724,8 @@ Defines virtual screen parameters. ...@@ -724,8 +724,8 @@ Defines virtual screen parameters.
| Name | Type| Readable| Writable| Description | | Name | Type| Readable| Writable| Description |
| --------- | -------- | ---- | ---- | ------------------------- | | --------- | -------- | ---- | ---- | ------------------------- |
| name | string | Yes | Yes | Name of a virtual screen. | | name | string | Yes | Yes | Name of a virtual screen. |
| width | number | Yes | Yes | Width of the virtual screen. | | width | number | Yes | Yes | Width of the virtual screen, in pixels.|
| height | number | Yes | Yes | Height of the virtual screen. | | height | number | Yes | Yes | Height of the virtual screen, in pixels.|
| density | number | Yes | Yes | Density of the virtual screen. | | density | number | Yes | Yes | Density of the virtual screen. |
| surfaceId | string | Yes | Yes | Surface ID of the virtual screen.| | surfaceId | string | Yes | Yes | Surface ID of the virtual screen.|
...@@ -1006,6 +1006,6 @@ Defines the screen mode information. ...@@ -1006,6 +1006,6 @@ Defines the screen mode information.
| Name | Type| Readable| Writable| Description | | Name | Type| Readable| Writable| Description |
| ----------- | -------- | ---- | ---- | -------------------------------------------------- | | ----------- | -------- | ---- | ---- | -------------------------------------------------- |
| id | number | Yes | Yes | Mode ID. The supported mode is determined by the device resolution and refresh rate.| | id | number | Yes | Yes | Mode ID. The supported mode is determined by the device resolution and refresh rate.|
| width | number | Yes | Yes | Screen width. | | width | number | Yes | Yes | Width of the screen, in pixels. |
| height | number | Yes | Yes | Screen height. | | height | number | Yes | Yes | Height of the screen, in pixels. |
| refreshRate | number | Yes | Yes | Screen refresh rate. | | refreshRate | number | Yes | Yes | Screen refresh rate. |
...@@ -2876,7 +2876,7 @@ Transforms a rotation vector based on the coordinate system. This API uses an as ...@@ -2876,7 +2876,7 @@ Transforms a rotation vector based on the coordinate system. This API uses an as
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ---------------- | ----------------------------------------- | ---- | ---------------------- | | ---------------- | ----------------------------------------- | ---- | ---------------------- |
| inRotationVector | Array&lt;number&gt; | Yes | Rotation matrix. | | inRotationVector | Array&lt;number&gt; | Yes | Rotation vector. |
| coordinates | [CoordinatesOptions](#coordinatesoptions) | Yes | Rotation vector to transform. | | coordinates | [CoordinatesOptions](#coordinatesoptions) | Yes | Rotation vector to transform. |
| callback | AsyncCallback&lt;Array&lt;number&gt;&gt; | Yes | Callback used to return the rotation vector after being transformed.| | callback | AsyncCallback&lt;Array&lt;number&gt;&gt; | Yes | Callback used to return the rotation vector after being transformed.|
...@@ -2923,7 +2923,7 @@ Transforms a rotation vector based on the coordinate system. This API uses a pro ...@@ -2923,7 +2923,7 @@ Transforms a rotation vector based on the coordinate system. This API uses a pro
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ---------------- | ----------------------------------------- | ---- | ---------------- | | ---------------- | ----------------------------------------- | ---- | ---------------- |
| inRotationVector | Array&lt;number&gt; | Yes | Rotation matrix. | | inRotationVector | Array&lt;number&gt; | Yes | Rotation vector. |
| coordinates | [CoordinatesOptions](#coordinatesoptions) | Yes | Rotation vector to transform.| | coordinates | [CoordinatesOptions](#coordinatesoptions) | Yes | Rotation vector to transform.|
**Return value** **Return value**
...@@ -3179,7 +3179,7 @@ For details about the following error codes, see [Error Codes of sensor.getRotat ...@@ -3179,7 +3179,7 @@ For details about the following error codes, see [Error Codes of sensor.getRotat
try { try {
let gravity = [-0.27775216, 0.5351276, 9.788099]; let gravity = [-0.27775216, 0.5351276, 9.788099];
let geomagnetic = [210.87253, -78.6096, -111.44444]; let geomagnetic = [210.87253, -78.6096, -111.44444];
sensor.getRotationMatrix(gravity, geomagnetic, function (err, data) => { sensor.getRotationMatrix(gravity, geomagnetic, function (err, data) {
if (err) { if (err) {
console.error('Get rotationMatrix failed. Error code: ' + err.code + '; message: ' + err.message); console.error('Get rotationMatrix failed. Error code: ' + err.code + '; message: ' + err.message);
return; return;
...@@ -3477,7 +3477,7 @@ Describes the sensor information. ...@@ -3477,7 +3477,7 @@ Describes the sensor information.
| Name | Type| Readable| Writable| Description | | Name | Type| Readable| Writable| Description |
| --------------- | -------- | ---------------------- | ---------------------- | ---------------------- | | --------------- | -------- | ---------------------- | ---------------------- | ---------------------- |
| sensorName | string | Yes | Yes | Sensor name. | | sensorName | string | Yes | Yes | Sensor name. |
| venderName | string | Yes | Yes | Vendor of the sensor. | | venderName | string | Yes | Yes | Vendor of the sensor. |
| firmwareVersion | string | Yes | Yes | Firmware version of the sensor. | | firmwareVersion | string | Yes | Yes | Firmware version of the sensor. |
| hardwareVersion | string | Yes | Yes | Hardware version of the sensor. | | hardwareVersion | string | Yes | Yes | Hardware version of the sensor. |
| sensorId | number | Yes | Yes | Sensor type ID. | | sensorId | number | Yes | Yes | Sensor type ID. |
...@@ -3496,9 +3496,9 @@ Describes the acceleration sensor data. It extends from [Response](#response). ...@@ -3496,9 +3496,9 @@ Describes the acceleration sensor data. It extends from [Response](#response).
| Name| Type | Readable| Writable| Description | | Name| Type | Readable| Writable| Description |
| ---- | ------ | ---- | ---- | ------------------------------------ | | ---- | ------ | ---- | ---- | ------------------------------------ |
| x | number | Yes | Yes | Acceleration along the x-axis of the device, in m/s². | | x | number | Yes | Yes | Acceleration along the x-axis of the device, in m/s².|
| y | number | Yes | Yes | Acceleration along the y-axis of the device, in m/s². | | y | number | Yes | Yes | Acceleration along the y-axis of the device, in m/s².|
| z | number | Yes | Yes | Acceleration along the z-axis of the device, in m/s². | | z | number | Yes | Yes | Acceleration along the z-axis of the device, in m/s².|
## LinearAccelerometerResponse ## LinearAccelerometerResponse
...@@ -3510,9 +3510,9 @@ Describes the linear acceleration sensor data. It extends from [Response](#respo ...@@ -3510,9 +3510,9 @@ Describes the linear acceleration sensor data. It extends from [Response](#respo
| Name| Type | Readable| Writable| Description | | Name| Type | Readable| Writable| Description |
| ---- | ------ | ---- | ---- | ---------------------------------------- | | ---- | ------ | ---- | ---- | ---------------------------------------- |
| x | number | Yes | Yes | Linear acceleration along the x-axis of the device, in m/s². | | x | number | Yes | Yes | Linear acceleration along the x-axis of the device, in m/s².|
| y | number | Yes | Yes | Linear acceleration along the y-axis of the device, in m/s². | | y | number | Yes | Yes | Linear acceleration along the y-axis of the device, in m/s².|
| z | number | Yes | Yes | Linear acceleration along the z-axis of the device, in m/s². | | z | number | Yes | Yes | Linear acceleration along the z-axis of the device, in m/s².|
## AccelerometerUncalibratedResponse ## AccelerometerUncalibratedResponse
...@@ -3524,12 +3524,12 @@ Describes the uncalibrated acceleration sensor data. It extends from [Response]( ...@@ -3524,12 +3524,12 @@ Describes the uncalibrated acceleration sensor data. It extends from [Response](
| Name | Type | Readable| Writable| Description | | Name | Type | Readable| Writable| Description |
| ----- | ------ | ---- | ---- | ------------------------------------------------ | | ----- | ------ | ---- | ---- | ------------------------------------------------ |
| x | number | Yes | Yes | Uncalibrated acceleration along the x-axis of the device, in m/s². | | x | number | Yes | Yes | Uncalibrated acceleration along the x-axis of the device, in m/s². |
| y | number | Yes | Yes | Uncalibrated acceleration along the y-axis of the device, in m/s². | | y | number | Yes | Yes | Uncalibrated acceleration along the y-axis of the device, in m/s². |
| z | number | Yes | Yes | Uncalibrated acceleration along the z-axis of the device, in m/s². | | z | number | Yes | Yes | Uncalibrated acceleration along the z-axis of the device, in m/s². |
| biasX | number | Yes | Yes | Uncalibrated acceleration bias along the x-axis of the device, in m/s². | | biasX | number | Yes | Yes | Uncalibrated acceleration bias along the x-axis of the device, in m/s². |
| biasY | number | Yes | Yes | Uncalibrated acceleration bias along the y-axis of the device, in m/s². | | biasY | number | Yes | Yes | Uncalibrated acceleration bias along the y-axis of the device, in m/s².|
| biasZ | number | Yes | Yes | Uncalibrated acceleration bias along the z-axis of the device, in m/s². | | biasZ | number | Yes | Yes | Uncalibrated acceleration bias along the z-axis of the device, in m/s². |
## GravityResponse ## GravityResponse
...@@ -3541,9 +3541,9 @@ Describes the gravity sensor data. It extends from [Response](#response). ...@@ -3541,9 +3541,9 @@ Describes the gravity sensor data. It extends from [Response](#response).
| Name| Type | Readable| Writable| Description | | Name| Type | Readable| Writable| Description |
| ---- | ------ | ---- | ---- | ---------------------------------------- | | ---- | ------ | ---- | ---- | ---------------------------------------- |
| x | number | Yes | Yes | Gravitational acceleration along the x-axis of the device, in m/s². | | x | number | Yes | Yes | Gravitational acceleration along the x-axis of the device, in m/s².|
| y | number | Yes | Yes | Gravitational acceleration along the y-axis of the device, in m/s². | | y | number | Yes | Yes | Gravitational acceleration along the y-axis of the device, in m/s².|
| z | number | Yes | Yes | Gravitational acceleration along the z-axis of the device, in m/s². | | z | number | Yes | Yes | Gravitational acceleration along the z-axis of the device, in m/s².|
## OrientationResponse ## OrientationResponse
...@@ -3831,6 +3831,18 @@ Describes the geographical location. ...@@ -3831,6 +3831,18 @@ Describes the geographical location.
| longitude | number | Yes | Yes | Longitude. | | longitude | number | Yes | Yes | Longitude. |
| altitude | number | Yes | Yes | Altitude.| | altitude | number | Yes | Yes | Altitude.|
## LocationOptions
Describes the geographical location.
**System capability**: SystemCapability.Sensors.Sensor
| Name | Type | Readable | Writable | Description |
| --------- | ------ | -------- | -------- | ----------- |
| latitude | number | Yes | Yes | Latitude. |
| longitude | number | Yes | Yes | Longitude. |
| altitude | number | Yes | Yes | Altitude. |
## sensor.on<sup>(deprecated)</sup> ## sensor.on<sup>(deprecated)</sup>
### ACCELEROMETER<sup>(deprecated)</sup> ### ACCELEROMETER<sup>(deprecated)</sup>
...@@ -6231,7 +6243,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.getRo ...@@ -6231,7 +6243,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.getRo
} }
console.info(JSON.stringify(data)); console.info(JSON.stringify(data));
}) })
``` ```
......
...@@ -188,10 +188,10 @@ Describes the rectangular area of the window. ...@@ -188,10 +188,10 @@ Describes the rectangular area of the window.
| Name | Type| Readable| Writable| Description | | Name | Type| Readable| Writable| Description |
| ------ | -------- | ---- | ---- | ------------------ | | ------ | -------- | ---- | ---- | ------------------ |
| left | number | Yes | Yes | Left boundary of the rectangle.| | left | number | Yes | Yes | Left boundary of the rectangle, in pixels.|
| top | number | Yes | Yes | Top boundary of the rectangle.| | top | number | Yes | Yes | Top boundary of the rectangle, in pixels.|
| width | number | Yes | Yes | Width of the rectangle. | | width | number | Yes | Yes | Width of the rectangle, in pixels.|
| height | number | Yes | Yes | Height of the rectangle. | | height | number | Yes | Yes | Height of the rectangle, in pixels.|
## AvoidArea<sup>7+</sup> ## AvoidArea<sup>7+</sup>
...@@ -215,8 +215,8 @@ Describes the window size. ...@@ -215,8 +215,8 @@ Describes the window size.
| Name | Type| Readable| Writable| Description | | Name | Type| Readable| Writable| Description |
| ------ | -------- | ---- | ---- | ---------- | | ------ | -------- | ---- | ---- | ---------- |
| width | number | Yes | Yes | Window width.| | width | number | Yes | Yes | Window width, in pixels.|
| height | number | Yes | Yes | Window height.| | height | number | Yes | Yes | Window height, in pixels.|
## WindowProperties ## WindowProperties
...@@ -824,7 +824,7 @@ create(id: string, type: WindowType, callback: AsyncCallback&lt;Window&gt;): voi ...@@ -824,7 +824,7 @@ create(id: string, type: WindowType, callback: AsyncCallback&lt;Window&gt;): voi
Creates a subwindow. This API uses an asynchronous callback to return the result. Creates a subwindow. This API uses an asynchronous callback to return the result.
> **NOTE** > **NOTE**
> >
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [createWindow()](#windowcreatewindow9) instead. > This API is supported since API version 7 and deprecated since API version 9. You are advised to use [createWindow()](#windowcreatewindow9) instead.
**Model restriction**: This API can be used only in the FA model. **Model restriction**: This API can be used only in the FA model.
...@@ -860,7 +860,7 @@ create(id: string, type: WindowType): Promise&lt;Window&gt; ...@@ -860,7 +860,7 @@ create(id: string, type: WindowType): Promise&lt;Window&gt;
Creates a subwindow. This API uses a promise to return the result. Creates a subwindow. This API uses a promise to return the result.
> **NOTE** > **NOTE**
> >
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [createWindow()](#windowcreatewindow9-1) instead. > This API is supported since API version 7 and deprecated since API version 9. You are advised to use [createWindow()](#windowcreatewindow9-1) instead.
**Model restriction**: This API can be used only in the FA model. **Model restriction**: This API can be used only in the FA model.
...@@ -900,7 +900,7 @@ create(ctx: BaseContext, id: string, type: WindowType, callback: AsyncCallback&l ...@@ -900,7 +900,7 @@ create(ctx: BaseContext, id: string, type: WindowType, callback: AsyncCallback&l
Creates a system window. This API uses an asynchronous callback to return the result. Creates a system window. This API uses an asynchronous callback to return the result.
> **NOTE** > **NOTE**
> >
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [createWindow()](#windowcreatewindow9) instead. > This API is supported since API version 7 and deprecated since API version 9. You are advised to use [createWindow()](#windowcreatewindow9) instead.
**System capability**: SystemCapability.WindowManager.WindowManager.Core **System capability**: SystemCapability.WindowManager.WindowManager.Core
...@@ -936,7 +936,7 @@ create(ctx: BaseContext, id: string, type: WindowType): Promise&lt;Window&gt; ...@@ -936,7 +936,7 @@ create(ctx: BaseContext, id: string, type: WindowType): Promise&lt;Window&gt;
Creates a system window. This API uses a promise to return the result. Creates a system window. This API uses a promise to return the result.
> **NOTE** > **NOTE**
> >
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [createWindow()](#windowcreatewindow9-1) instead. > This API is supported since API version 7 and deprecated since API version 9. You are advised to use [createWindow()](#windowcreatewindow9-1) instead.
**System capability**: SystemCapability.WindowManager.WindowManager.Core **System capability**: SystemCapability.WindowManager.WindowManager.Core
...@@ -975,7 +975,7 @@ find(id: string, callback: AsyncCallback&lt;Window&gt;): void ...@@ -975,7 +975,7 @@ find(id: string, callback: AsyncCallback&lt;Window&gt;): void
Finds a window based on the ID. This API uses an asynchronous callback to return the result. Finds a window based on the ID. This API uses an asynchronous callback to return the result.
> **NOTE** > **NOTE**
> >
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [findWindow()](#windowfindwindow9) instead. > This API is supported since API version 7 and deprecated since API version 9. You are advised to use [findWindow()](#windowfindwindow9) instead.
**System capability**: SystemCapability.WindowManager.WindowManager.Core **System capability**: SystemCapability.WindowManager.WindowManager.Core
...@@ -1008,7 +1008,7 @@ find(id: string): Promise&lt;Window&gt; ...@@ -1008,7 +1008,7 @@ find(id: string): Promise&lt;Window&gt;
Finds a window based on the ID. This API uses a promise to return the result. Finds a window based on the ID. This API uses a promise to return the result.
> **NOTE** > **NOTE**
> >
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [findWindow()](#windowfindwindow9) instead. > This API is supported since API version 7 and deprecated since API version 9. You are advised to use [findWindow()](#windowfindwindow9) instead.
**System capability**: SystemCapability.WindowManager.WindowManager.Core **System capability**: SystemCapability.WindowManager.WindowManager.Core
...@@ -1045,7 +1045,7 @@ getTopWindow(callback: AsyncCallback&lt;Window&gt;): void ...@@ -1045,7 +1045,7 @@ getTopWindow(callback: AsyncCallback&lt;Window&gt;): void
Obtains the top window of the current application. This API uses an asynchronous callback to return the result. Obtains the top window of the current application. This API uses an asynchronous callback to return the result.
> **NOTE** > **NOTE**
> >
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [getLastWindow()](#windowgetlastwindow9) instead. > This API is supported since API version 6 and deprecated since API version 9. You are advised to use [getLastWindow()](#windowgetlastwindow9) instead.
**Model restriction**: This API can be used only in the FA model. **Model restriction**: This API can be used only in the FA model.
...@@ -1079,7 +1079,7 @@ getTopWindow(): Promise&lt;Window&gt; ...@@ -1079,7 +1079,7 @@ getTopWindow(): Promise&lt;Window&gt;
Obtains the top window of the current application. This API uses a promise to return the result. Obtains the top window of the current application. This API uses a promise to return the result.
> **NOTE** > **NOTE**
> >
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [getLastWindow()](#windowgetlastwindow9-1) instead. > This API is supported since API version 6 and deprecated since API version 9. You are advised to use [getLastWindow()](#windowgetlastwindow9-1) instead.
**Model restriction**: This API can be used only in the FA model. **Model restriction**: This API can be used only in the FA model.
...@@ -1112,7 +1112,7 @@ getTopWindow(ctx: BaseContext, callback: AsyncCallback&lt;Window&gt;): void ...@@ -1112,7 +1112,7 @@ getTopWindow(ctx: BaseContext, callback: AsyncCallback&lt;Window&gt;): void
Obtains the top window of the current application. This API uses an asynchronous callback to return the result. Obtains the top window of the current application. This API uses an asynchronous callback to return the result.
> **NOTE** > **NOTE**
> >
> This API is supported since API version 8 and deprecated since API version 9. You are advised to use [getLastWindow()](#windowgetlastwindow9) instead. > This API is supported since API version 8 and deprecated since API version 9. You are advised to use [getLastWindow()](#windowgetlastwindow9) instead.
**System capability**: SystemCapability.WindowManager.WindowManager.Core **System capability**: SystemCapability.WindowManager.WindowManager.Core
...@@ -1145,7 +1145,7 @@ getTopWindow(ctx: BaseContext): Promise&lt;Window&gt; ...@@ -1145,7 +1145,7 @@ getTopWindow(ctx: BaseContext): Promise&lt;Window&gt;
Obtains the top window of the current application. This API uses a promise to return the result. Obtains the top window of the current application. This API uses a promise to return the result.
> **NOTE** > **NOTE**
> >
> This API is supported since API version 8 and deprecated since API version 9. You are advised to use [getLastWindow()](#windowgetlastwindow9-1) instead. > This API is supported since API version 8 and deprecated since API version 9. You are advised to use [getLastWindow()](#windowgetlastwindow9-1) instead.
**System capability**: SystemCapability.WindowManager.WindowManager.Core **System capability**: SystemCapability.WindowManager.WindowManager.Core
...@@ -5903,9 +5903,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -5903,9 +5903,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
class myAbility extends Ability { class myAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
let windowClass = null; let windowClass = null;
...@@ -5949,9 +5949,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -5949,9 +5949,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
class myAbility extends Ability { class myAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
let windowClass = null; let windowClass = null;
...@@ -5994,9 +5994,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -5994,9 +5994,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
class myAbility extends Ability { class myAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
try { try {
...@@ -6037,9 +6037,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6037,9 +6037,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
class myAbility extends Ability { class myAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
let windowClass = null; let windowClass = null;
...@@ -6093,9 +6093,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6093,9 +6093,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
class myAbility extends Ability { class myAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
let windowClass = null; let windowClass = null;
...@@ -6141,9 +6141,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6141,9 +6141,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
class myAbility extends Ability { class myAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
let windowClass = null; let windowClass = null;
...@@ -6185,9 +6185,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6185,9 +6185,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
class myAbility extends Ability { class myAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
let windowClass = null; let windowClass = null;
...@@ -6231,9 +6231,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6231,9 +6231,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
class myAbility extends Ability { class myAbility extends UIAbility {
storage : LocalStorage storage : LocalStorage
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
this.storage = new LocalStorage(); this.storage = new LocalStorage();
...@@ -6289,9 +6289,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6289,9 +6289,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
class myAbility extends Ability { class myAbility extends UIAbility {
storage : LocalStorage storage : LocalStorage
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
this.storage = new LocalStorage(); this.storage = new LocalStorage();
...@@ -6340,9 +6340,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6340,9 +6340,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
class myAbility extends Ability { class myAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
try { try {
...@@ -6389,9 +6389,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6389,9 +6389,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
class myAbility extends Ability { class myAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
try { try {
...@@ -6436,9 +6436,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6436,9 +6436,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
class myAbility extends Ability { class myAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
try { try {
...@@ -6475,9 +6475,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6475,9 +6475,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
class myAbility extends Ability { class myAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('disableWindowDecor'); console.log('disableWindowDecor');
windowStage.disableWindowDecor(); windowStage.disableWindowDecor();
...@@ -6515,9 +6515,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6515,9 +6515,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
class myAbility extends Ability { class myAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
try { try {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册