| reason | string | Yes| Reason for delayed transition to the suspended state.|
| callback | Callback<void> | Yes| Invoked when a delay is about to time out. Generally, this callback is used to notify the application 6 seconds before the delay times out.|
| reason | string | Yes | Reason for delayed transition to the suspended state. |
| callback | Callback<void> | Yes | Invoked when a delay is about to time out. Generally, this callback is used to notify the application 6 seconds before the delay times out. |
**Return value**
| Type| Description|
| -------- | -------- |
| [DelaySuspendInfo](#delaysuspendinfo) | Information about the suspension delay.|
| requestId | number | Yes | ID of the suspension delay request. |
| callback | AsyncCallback<number> | Yes | Callback used to return the remaining duration before the application is suspended, in milliseconds. |
**Example**
...
...
@@ -78,14 +78,14 @@ Obtains the remaining duration before the application is suspended. This API use
| wantAgent | [WantAgent](js-apis-wantAgent.md)| Yes| Notification parameter, which is used to specify the target page that is redirected to when a continuous task notification is clicked.|
| callback | AsyncCallback<void> | Yes| Callback used to return the result.|
| wantAgent | [WantAgent](js-apis-wantAgent.md) | Yes | Notification parameter, which is used to specify the target page that is redirected to when a continuous task notification is clicked. |
| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
**Example**
```js
...
...
@@ -180,16 +180,16 @@ Requests a continuous task from the system. This API uses a promise to return th
| wantAgent | [WantAgent](js-apis-wantAgent.md)| Yes| Notification parameter, which is used to specify the target page when a continuous task notification is clicked.|
| wantAgent | [WantAgent](js-apis-wantAgent.md) | Yes | Notification parameter, which is used to specify the target page when a continuous task notification is clicked. |
**Return value**
| Type | Description |
| -------------- | ------------------------- |
| Promise\<void> | Promise used to return the result.|
| requestId | number | Yes| ID of the suspension delay request.|
| actualDelayTime | number | Yes| Actual suspension delay duration of the application, in milliseconds.<br>The default duration is 180000 when the battery level is higher than or equal to the broadcast low battery level and 60000 when the battery level is lower than the broadcast low battery level.|
| requestId | number | Yes | ID of the suspension delay request. |
| actualDelayTime | number | Yes | Actual suspension delay duration of the application, in milliseconds.<br>The default duration is 180000 when the battery level is higher than or equal to the broadcast low battery level and 60000 when the battery level is lower than the broadcast low battery level. |
| 900 | The current device does not support the corresponding sensor. |
## sensor.subscribeAccelerometer
...
...
@@ -33,19 +33,19 @@ Subscribes to data changes of the acceleration sensor. If this API is called mul
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| interval | string | Yes| Execution frequency of the callback for returning the acceleration sensor data.<br>The default value is **normal**. The options are as follows:<br>- **game**: called at an interval of 20 ms, which is applicable to gaming scenarios.<br>- **ui**: called at an interval of 60 ms, which is applicable to UI updating scenarios.<br>- **normal**: called at an interval of 200 ms, which is applicable to power-saving scenarios.|
| success | Function | Yes| Called when the acceleration sensor data changes.|
| interval | string | Yes | Execution frequency of the callback for returning the acceleration sensor data.<br>The default value is **normal**. The options are as follows:<br>- **game**: called at an interval of 20 ms, which is applicable to gaming scenarios.<br>- **ui**: called at an interval of 60 ms, which is applicable to UI updating scenarios.<br>- **normal**: called at an interval of 200 ms, which is applicable to power-saving scenarios. |
| success | Function | Yes | Called when the acceleration sensor data changes. |
| fail | Function | No | Callback upon failure. |
Return values of the success callback
| Name| Type| Description|
| -------- | -------- | -------- |
| x | number | Acceleration on the x-axis.|
| y | number | Acceleration on the y-axis.|
| z | number | Acceleration on the z-axis.|
| Name | Type | Description |
| ---- | ------ | --------------------------- |
| x | number | Acceleration on the x-axis. |
| y | number | Acceleration on the y-axis. |
| z | number | Acceleration on the z-axis. |
**Example**
...
...
@@ -92,16 +92,16 @@ Subscribes to data changes of the compass sensor. If this API is called multiple
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| success | Function | Yes| Called when the compass sensor data changes.|
| value | boolean | Whether the wearable device is worn. |
**Example**
...
...
@@ -498,18 +498,18 @@ If this API is called multiple times for the same application, the last call tak
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| interval | string | Yes| Interval at which the callback is invoked to return the device orientation sensor data.<br>The default value is **normal**. The options are as follows:<br>- **game**: called at an interval of 20 ms, which is applicable to gaming scenarios.<br>- **ui**: called at an interval of 60 ms, which is applicable to UI updating scenarios.<br>- **normal**: called at an interval of 200 ms, which is applicable to power-saving scenarios.|
| success | Function | Yes| Called when the device orientation sensor data changes.|
| interval | string | Yes | Interval at which the callback is invoked to return the device orientation sensor data.<br>The default value is **normal**. The options are as follows:<br>- **game**: called at an interval of 20 ms, which is applicable to gaming scenarios.<br>- **ui**: called at an interval of 60 ms, which is applicable to UI updating scenarios.<br>- **normal**: called at an interval of 200 ms, which is applicable to power-saving scenarios. |
| success | Function | Yes | Called when the device orientation sensor data changes. |
| fail | Function | No | Callback upon failure. |
Return values of the success callback
| Name| Type| Description|
| -------- | -------- | -------- |
| alpha | number | Rotation angle around the Z axis when the X/Y axis of the mobile phone coincides with the X/Y axis of the earth.|
| beta | number | Rotation angle around the X axis when the Y/Z axis of the mobile phone coincides with the Y/Z axis of the earth.|
| gamma | number | Rotation angle around the Y axis when the X/Z axis of the mobile phone coincides with the X/Z axis of the earth.|
| alpha | number | Rotation angle around the Z axis when the X/Y axis of the mobile device coincides with the X/Y axis of the earth. |
| beta | number | Rotation angle around the X axis when the Y/Z axis of the mobile device coincides with the Y/Z axis of the earth. |
| gamma | number | Rotation angle around the Y axis when the X/Z axis of the mobile device coincides with the X/Z axis of the earth. |
**Example**
...
...
@@ -558,19 +558,19 @@ If this API is called multiple times for the same application, the last call tak
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| interval | string | Yes| Interval at which the callback is invoked to return the gyroscope sensor data.<br>The default value is **normal**. The options are as follows:<br>- **game**: called at an interval of 20 ms, which is applicable to gaming scenarios.<br>- **ui**: called at an interval of 60 ms, which is applicable to UI updating scenarios.<br>- **normal**: called at an interval of 200 ms, which is applicable to power-saving scenarios.|
| success | Function | Yes| Called when the gyroscope sensor data changes.|
| interval | string | Yes | Interval at which the callback is invoked to return the gyroscope sensor data.<br>The default value is **normal**. The options are as follows:<br>- **game**: called at an interval of 20 ms, which is applicable to gaming scenarios.<br>- **ui**: called at an interval of 60 ms, which is applicable to UI updating scenarios.<br>- **normal**: called at an interval of 200 ms, which is applicable to power-saving scenarios. |
| success | Function | Yes | Called when the gyroscope sensor data changes. |
| fail | Function | No | Callback upon failure. |
Return values of the success callback
| Name| Type| Description|
| -------- | -------- | -------- |
| x | number | Rotation angular velocity of the X axis.|
| y | number | Rotation angular velocity of the Y axis.|
| z | number | Rotation angular velocity of the Z axis.|
@@ -8,7 +8,7 @@ The Update module applies to updates throughout the entire system, including bui
There are two types of updates: SD card update and over the air (OTA) update.
- The SD card update depends on the update packages and SD cards.
- The OTA update depends on the server deployed by the phone manufacturer for managing update packages. The OTA server IP address is passed by the caller. The request interface is fixed and developed by the phone manufacturer.
- The OTA update depends on the server deployed by the device manufacturer for managing update packages. The OTA server IP address is passed by the caller. The request interface is fixed and developed by the device manufacturer.
## Modules to Import
...
...
@@ -31,15 +31,15 @@ Obtains the **Updater** object for local update.
<tdclass="cellrowborder"valign="top"width="35.76%"headers="mcps1.1.6.1.5 "><pid="p196974598338"><aname="p196974598338"></a><aname="p196974598338"></a>Dynamic modification is not supported. If this attribute is not set, capsule-like buttons are displayed. Different from the capsule button, the four rounded corners of a capsule-like button can be configured using <strongid="b14306174652119"><aname="b14306174652119"></a><aname="b14306174652119"></a>border-radius</strong>. Available button types are as follows:</p>
<aname="ul16971659103317"></a><aname="ul16971659103317"></a><ulid="ul16971659103317"><li><strongid="b2068317502142"><aname="b2068317502142"></a><aname="b2068317502142"></a>capsule</strong>: a capsule button with fillets, background color, and text</li><li><strongid="b13498122171611"><aname="b13498122171611"></a><aname="b13498122171611"></a>circle</strong>: a circle button which can be used to place icons</li><li><strongid="b17405113184910"><aname="b17405113184910"></a><aname="b17405113184910"></a>text</strong>: a text button which displays the text only</li><li><strongid="b1654481619215"><aname="b1654481619215"></a><aname="b1654481619215"></a>arc</strong>: an arc button. This value is applicable to wearables only.</li><li><strongid="b49041951132"><aname="b49041951132"></a><aname="b49041951132"></a>download</strong>: a download button. The download progress bar is added. This value is applicable to smart TVs and smartphones.</li></ul>
<aname="ul16971659103317"></a><aname="ul16971659103317"></a><ulid="ul16971659103317"><li><strongid="b2068317502142"><aname="b2068317502142"></a><aname="b2068317502142"></a>capsule</strong>: a capsule button with fillets, background color, and text</li><li><strongid="b13498122171611"><aname="b13498122171611"></a><aname="b13498122171611"></a>circle</strong>: a circle button which can be used to place icons</li><li><strongid="b17405113184910"><aname="b17405113184910"></a><aname="b17405113184910"></a>text</strong>: a text button which displays the text only</li><li><strongid="b1654481619215"><aname="b1654481619215"></a><aname="b1654481619215"></a>arc</strong>: an arc button. This value is applicable to wearables only.</li><li><strongid="b49041951132"><aname="b49041951132"></a><aname="b49041951132"></a>download</strong>: a download button. The download progress bar is added. </li></ul>
@@ -72,7 +72,7 @@ In addition to the attributes in [Universal Attributes](js-components-common-at
<tdclass="cellrowborder"valign="top"width="35.76%"headers="mcps1.1.6.1.5 "><pid="p1455632813277"><aname="p1455632813277"></a><aname="p1455632813277"></a>Data structures used by <strongid="b1997913981710"><aname="b1997913981710"></a><aname="b1997913981710"></a>progress</strong>, <strongid="b991191118176"><aname="b991191118176"></a><aname="b991191118176"></a>loading</strong>, and <strongid="b962820295179"><aname="b962820295179"></a><aname="b962820295179"></a>rainbow</strong> charts.</p>
<pid="p19327195813510"><aname="p19327195813510"></a><aname="p19327195813510"></a><strongid="b196601530164710"><aname="b196601530164710"></a><aname="b196601530164710"></a>DataSegment</strong> is available for <strongid="b1066083012472"><aname="b1066083012472"></a><aname="b1066083012472"></a>progress</strong> and <strongid="b16660143054719"><aname="b16660143054719"></a><aname="b16660143054719"></a>loading</strong> charts.</p>
<pid="p14326258457"><aname="p14326258457"></a><aname="p14326258457"></a><strongid="b1044023344716"><aname="b1044023344716"></a><aname="b1044023344716"></a>Array<<ahref="#table2596183616210">DataSegment</a>></strong> is available for <strongid="b194405335477"><aname="b194405335477"></a><aname="b194405335477"></a>rainbow</strong> charts. A maximum of nine <strongid="b15441133114716"><aname="b15441133114716"></a><aname="b15441133114716"></a>DataSegment</strong> are supported in the array.</p>
<divclass="note"id="note74451328478"><aname="note74451328478"></a><aname="note74451328478"></a><spanclass="notetitle"> NOTE: </span><divclass="notebody"><pid="p1744552174711"><aname="p1744552174711"></a><aname="p1744552174711"></a>This attribute is only supported on phones and tablets.</p>
<tdclass="cellrowborder"valign="top"width="35.76%"headers="mcps1.1.6.1.5 "><pid="p92085712225"><aname="p92085712225"></a><aname="p92085712225"></a>Whether to enable the effects for <strongid="b7262163754711"><aname="b7262163754711"></a><aname="b7262163754711"></a>progress</strong> and <strongid="b12263437134715"><aname="b12263437134715"></a><aname="b12263437134715"></a>rainbow</strong> charts.</p>
<divclass="note"id="note15640931164717"><aname="note15640931164717"></a><aname="note15640931164717"></a><spanclass="notetitle"> NOTE: </span><divclass="notebody"><pid="p2064014318476"><aname="p2064014318476"></a><aname="p2064014318476"></a>This attribute is only supported on phones and tablets.</p>
<tdclass="cellrowborder"valign="top"width="35.76%"headers="mcps1.1.6.1.5 "><pid="p181331564408"><aname="p181331564408"></a><aname="p181331564408"></a>Animation duration for expanding a <strongid="b538918433184"><aname="b538918433184"></a><aname="b538918433184"></a>rainbow</strong> chart, in milliseconds.</p>
<divclass="note"id="note12117134774716"><aname="note12117134774716"></a><aname="note12117134774716"></a><spanclass="notetitle"> NOTE: </span><divclass="notebody"><pid="p12117124720471"><aname="p12117124720471"></a><aname="p12117124720471"></a>This attribute is only supported on phones and tablets.</p>
<tdclass="cellrowborder"valign="top"width="49.410000000000004%"headers="mcps1.1.6.1.5 "><pid="p781663212178"><aname="p781663212178"></a><aname="p781663212178"></a>Whether to display the lunar calendar switch in the date selector. When this switch is displayed, you can switch between the lunar calendar and Gregorian calendar. Turn on the switch to display the lunar calendar, and turn off the switch to hide the lunar calendar. This attribute is available for smartphones.</p>
<divclass="note"id="note1688512355211"><aname="note1688512355211"></a><aname="note1688512355211"></a><spanclass="notetitle"> NOTE: </span><divclass="notebody"><pid="p488582345212"><aname="p488582345212"></a><aname="p488582345212"></a>This attribute is only supported on phones and tablets.</p>
<tdclass="cellrowborder"valign="top"width="49.410000000000004%"headers="mcps1.1.6.1.5 "><pid="p781663212178"><aname="p781663212178"></a><aname="p781663212178"></a>Whether to display the lunar calendar switch in the date selector. When this switch is displayed, you can switch between the lunar calendar and Gregorian calendar. Turn on the switch to display the lunar calendar, and turn off the switch to hide the lunar calendar. </p>
<tdclass="cellrowborder"valign="top"width="49.410000000000004%"headers="mcps1.1.6.1.5 "><pid="p12203111510184"><aname="p12203111510184"></a><aname="p12203111510184"></a>Whether to display the lunar calendar switch in the date and time selector. When this switch is displayed, you can switch between the lunar calendar and Gregorian calendar. Turn on the switch to display the lunar calendar, and turn off the switch to hide the lunar calendar. This attribute is available for smartphones.</p>
<divclass="note"id="note11541837195218"><aname="note11541837195218"></a><aname="note11541837195218"></a><spanclass="notetitle"> NOTE: </span><divclass="notebody"><pid="p454119371529"><aname="p454119371529"></a><aname="p454119371529"></a>This attribute is only supported on phones and tablets.</p>
<tdclass="cellrowborder"valign="top"width="49.410000000000004%"headers="mcps1.1.6.1.5 "><pid="p12203111510184"><aname="p12203111510184"></a><aname="p12203111510184"></a>Whether to display the lunar calendar switch in the date and time selector. When this switch is displayed, you can switch between the lunar calendar and Gregorian calendar. Turn on the switch to display the lunar calendar, and turn off the switch to hide the lunar calendar. </p>
<tdclass="cellrowborder"valign="top"width="40.01599840015999%"headers="mcps1.1.6.1.5 "><pid="p20494323144012"><aname="p20494323144012"></a><aname="p20494323144012"></a>Font color of the items that gradually disappear. Disappearing items are the top option and bottom option of a column containing five options in total.</p>
<divclass="note"id="note682125718522"><aname="note682125718522"></a><aname="note682125718522"></a><spanclass="notetitle"> NOTE: </span><divclass="notebody"><pid="p17821185711521"><aname="p17821185711521"></a><aname="p17821185711521"></a>This attribute is only supported on phones and tablets.</p>
<tdclass="cellrowborder"valign="top"width="40.01599840015999%"headers="mcps1.1.6.1.5 "><pid="p1549532364020"><aname="p1549532364020"></a><aname="p1549532364020"></a>Font size of the items that gradually disappear. Disappearing items are the top option and bottom option of a column containing five options in total.</p>
<divclass="note"id="note17211975317"><aname="note17211975317"></a><aname="note17211975317"></a><spanclass="notetitle"> NOTE: </span><divclass="notebody"><pid="p1821895535"><aname="p1821895535"></a><aname="p1821895535"></a>This attribute is only supported on phones and tablets.</p>
<tdclass="cellrowborder"valign="top"width="49.410000000000004%"headers="mcps1.1.6.1.5 "><pid="p9878910132617"><aname="p9878910132617"></a><aname="p9878910132617"></a>Whether the date selector displays the lunar calendar switch, which is used to switch between the Gregorian calendar and lunar calendar. The value <strongid="b1242195251513"><aname="b1242195251513"></a><aname="b1242195251513"></a>true</strong> means to display the lunar calendar switch for users to switch between the Gregorian calendar and lunar calendar. The value <strongid="b729391317186"><aname="b729391317186"></a><aname="b729391317186"></a>false</strong> means not to display the lunar calendar switch.</p>
<divclass="note"id="note799016359510"><aname="note799016359510"></a><aname="note799016359510"></a><spanclass="notetitle"> NOTE: </span><divclass="notebody"><pid="p49901135165115"><aname="p49901135165115"></a><aname="p49901135165115"></a>This attribute is only supported on phones and tablets. When both <strongid="b66411209185"><aname="b66411209185"></a><aname="b66411209185"></a>lunarswitch</strong> and <strongid="b1364102010185"><aname="b1364102010185"></a><aname="b1364102010185"></a>lunar</strong> are set to <strongid="b665102015187"><aname="b665102015187"></a><aname="b665102015187"></a>true</strong>, the switch is selected.</p>
<divclass="note"id="note799016359510"><aname="note799016359510"></a><aname="note799016359510"></a><spanclass="notetitle"> NOTE: </span><divclass="notebody"><pid="p49901135165115"><aname="p49901135165115"></a><aname="p49901135165115"></a> When both <strongid="b66411209185"><aname="b66411209185"></a><aname="b66411209185"></a>lunarswitch</strong> and <strongid="b1364102010185"><aname="b1364102010185"></a><aname="b1364102010185"></a>lunar</strong> are set to <strongid="b665102015187"><aname="b665102015187"></a><aname="b665102015187"></a>true</strong>, the switch is selected.</p>
</div></div>
</td>
</tr>
...
...
@@ -329,7 +329,7 @@ When **type** is set to **datetime**, a date and time selector is used.
<tdclass="cellrowborder"valign="top"width="49.410000000000004%"headers="mcps1.1.6.1.5 "><pid="p134738505123"><aname="p134738505123"></a><aname="p134738505123"></a>Whether the date selector displays the lunar calendar switch, which is used to switch between the Gregorian calendar and lunar calendar. The value <strongid="b11888837151819"><aname="b11888837151819"></a><aname="b11888837151819"></a>true</strong> means to display the lunar calendar switch for users to switch between the Gregorian calendar and lunar calendar. The value <strongid="b454518384186"><aname="b454518384186"></a><aname="b454518384186"></a>false</strong> means not to display the lunar calendar switch.</p>
<divclass="note"id="note5428114735118"><aname="note5428114735118"></a><aname="note5428114735118"></a><spanclass="notetitle"> NOTE: </span><divclass="notebody"><pid="p1342819474512"><aname="p1342819474512"></a><aname="p1342819474512"></a>This attribute is only supported on phones and tablets. When both <strongid="b57802039111819"><aname="b57802039111819"></a><aname="b57802039111819"></a>lunarswitch</strong> and <strongid="b18781153991810"><aname="b18781153991810"></a><aname="b18781153991810"></a>lunar</strong> are set to <strongid="b4781173931813"><aname="b4781173931813"></a><aname="b4781173931813"></a>true</strong>, the switch is selected.</p>
<divclass="note"id="note5428114735118"><aname="note5428114735118"></a><aname="note5428114735118"></a><spanclass="notetitle"> NOTE: </span><divclass="notebody"><pid="p1342819474512"><aname="p1342819474512"></a><aname="p1342819474512"></a>When both <strongid="b57802039111819"><aname="b57802039111819"></a><aname="b57802039111819"></a>lunarswitch</strong> and <strongid="b18781153991810"><aname="b18781153991810"></a><aname="b18781153991810"></a>lunar</strong> are set to <strongid="b4781173931813"><aname="b4781173931813"></a><aname="b4781173931813"></a>true</strong>, the switch is selected.</p>
</div></div>
</td>
</tr>
...
...
@@ -529,7 +529,7 @@ In addition to the styles in [Universal Styles](js-components-common-styles.md)
<tdclass="cellrowborder"valign="top"width="52.274772522747725%"headers="mcps1.1.6.1.5 "><pid="p116215526369"><aname="p116215526369"></a><aname="p116215526369"></a>Height of the selector option list.</p>
<divclass="note"id="note769381335220"><aname="note769381335220"></a><aname="note769381335220"></a><spanclass="notetitle"> NOTE: </span><divclass="notebody"><pid="p18693101311524"><aname="p18693101311524"></a><aname="p18693101311524"></a>This attribute is only supported on phones and tablets.</p>
<tdclass="cellrowborder"valign="top"width="35.76%"headers="mcps1.1.6.1.5 "><pid="p27381813364"><aname="p27381813364"></a><aname="p27381813364"></a>Step to increment the rating value.</p>
<divclass="note"id="note1249472985312"><aname="note1249472985312"></a><aname="note1249472985312"></a><spanclass="notetitle"> NOTE: </span><divclass="notebody"><pid="p749462910531"><aname="p749462910531"></a><aname="p749462910531"></a>This attribute is only supported on phones and tablets.</p>
<tdclass="cellrowborder"valign="top"width="35.76%"headers="mcps1.1.6.1.5 "><pid="p83958323527"><aname="p83958323527"></a><aname="p83958323527"></a>Slider style. Available values are as follows:</p>
<aname="ul742810911538"></a><aname="ul742810911538"></a><ulid="ul742810911538"><li><strongid="b6310165918435"><aname="b6310165918435"></a><aname="b6310165918435"></a>outset</strong>: The slider is on the sliding bar.</li><li><strongid="b144297112440"><aname="b144297112440"></a><aname="b144297112440"></a>inset</strong>: The slider is inside the sliding bar.<divclass="note"id="note10509152215419"><aname="note10509152215419"></a><aname="note10509152215419"></a><spanclass="notetitle"> NOTE: </span><divclass="notebody"><pid="p14509172218549"><aname="p14509172218549"></a><aname="p14509172218549"></a>This attribute is only supported on phones and tablets.</p>
<aname="ul742810911538"></a><aname="ul742810911538"></a><ulid="ul742810911538"><li><strongid="b6310165918435"><aname="b6310165918435"></a><aname="b6310165918435"></a>outset</strong>: The slider is on the sliding bar.</li><li><strongid="b144297112440"><aname="b144297112440"></a><aname="b144297112440"></a>inset</strong>: The slider is inside the sliding bar.<divclass="note"id="note10509152215419"><aname="note10509152215419"></a><aname="note10509152215419"></a><spanclass="notetitle"> NOTE: </span><divclass="notebody"><pid="p14509172218549"><aname="p14509172218549"></a><aname="p14509172218549"></a></p>
</div></div>
</li></ul>
</td>
...
...
@@ -90,7 +90,7 @@ In addition to the attributes in [Universal Attributes](js-components-common-at
<tdclass="cellrowborder"valign="top"width="35.76%"headers="mcps1.1.6.1.5 "><pid="p639683265217"><aname="p639683265217"></a><aname="p639683265217"></a>Whether to display slider scales.</p>
<divclass="note"id="note8765635135413"><aname="note8765635135413"></a><aname="note8765635135413"></a><spanclass="notetitle"> NOTE: </span><divclass="notebody"><pid="p576523535418"><aname="p576523535418"></a><aname="p576523535418"></a>This attribute is only supported on phones and tablets.</p>
<tdclass="cellrowborder"valign="top"width="35.76%"headers="mcps1.1.6.1.5 "><pid="p16396133212520"><aname="p16396133212520"></a><aname="p16396133212520"></a>Whether a pop-up is displayed to show the percentage value on the slider.</p>
<divclass="note"id="note0708645135419"><aname="note0708645135419"></a><aname="note0708645135419"></a><spanclass="notetitle"> NOTE: </span><divclass="notebody"><pid="p4708154510548"><aname="p4708154510548"></a><aname="p4708154510548"></a>This attribute is only supported on phones and tablets.</p>
<divclass="note"id="note29562075516"><aname="note29562075516"></a><aname="note29562075516"></a><spanclass="notetitle"> NOTE: </span><divclass="notebody"><pid="p7956203555"><aname="p7956203555"></a><aname="p7956203555"></a>This attribute is only supported on phones, tablets, and wearables.</p>
<tdclass="cellrowborder"valign="top"width="35.76%"headers="mcps1.1.6.1.5 "><pid="p118021351362"><aname="p118021351362"></a><aname="p118021351362"></a>Pull-down friction coefficient. The value ranges from <strongid="b7887020335"><aname="b7887020335"></a><aname="b7887020335"></a>0</strong> to <strongid="b81365257313"><aname="b81365257313"></a><aname="b81365257313"></a>100</strong>. A larger value indicates a more responsive component. For example, if a user pulls the component down 100 px, it will actually move 100 *<strongid="b2130757132018"><aname="b2130757132018"></a><aname="b2130757132018"></a>friction</strong>% px.</p>
<divclass="note"id="note204304260349"><aname="note204304260349"></a><aname="note204304260349"></a><spanclass="notetitle"> NOTE: </span><divclass="notebody"><pid="p1343012264345"><aname="p1343012264345"></a><aname="p1343012264345"></a>This attribute is only supported on phones, tablets, and wearables.</p>
On the page for selecting an ability template, select [Standard]Empty Ability.
...
...
@@ -56,14 +56,14 @@ Before creating a project, you need to install DevEco Studio.
}
```
7. Click Previewer on the right to open the Previewer window. In the Previewer window of the phone type, Hello World is displayed in the middle and in bold.
7. Click Previewer on the right to open the Previewer window. Hello World is displayed in the middle and in bold.
If the Previewer button is unavailable, choose Settings > SDK Manager >OpenHarmony SDK > Tools to check whether the Previewer is installed.
8. Install the application on the phone and run the application. Connect the phone to the computer. After the IDE identifies the phone, click Run'entry'.
8. Install the application and run the application. Connect the device to the computer. After the IDE identifies the device, click Run'entry'.
Before the installation, you must configure an application signature. For details, see [Configuring the OpenHarmony App Signature](../quick-start/configuring-the-openharmony-app-signature.md). After the installation is complete, click the Run icon on the screen to open the application. Hello World is displayed in the center of the screen.
Before the installation, you must configure an application signature. For details, see Configuring the OpenHarmony App Signature. After the installation is complete, click the Run icon on the screen to open the application. Hello World is displayed in the center of the screen.
In addition to specifying the image path, you can also use the media resource symbol $r to reference resources based on the resource qualifier rules in the resources folder. Right-click the resources folder, choose New > Resource Directory, set Resource Type to Media (image resource), and set the resource qualifier to Device-Phone (currently, phones are used).
In addition to specifying the image path, you can also use the media resource symbol $r to reference resources based on the resource qualifier rules in the resources folder. Right-click the resources folder, choose New > Resource Directory, set Resource Type to Media (image resource).Place Tomato.png in the media folder.
You can then can reference the application resource in the ` "$r('app.type.name')"` format, that is, `$r('app.media.Tomato')`.
3. Add the icon for returning from the FoodDetail page to the food list page. Save the Back.png file to the resources > phone > media directory. Create a custom component PageTitle, which contains the back icon and Food Detail text. Call the router.back() API of the router to display the top page of the route stack, that is, the upper-level page.
3. Add the icon for returning from the FoodDetail page to the food list page. Save the Back.png file to the resources > base > media directory. Create a custom component PageTitle, which contains the back icon and Food Detail text. Call the router.back() API of the router to display the top page of the route stack, that is, the upper-level page.