• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Universal Events<a name="EN-US_TOPIC_0000001115814844"></a>
2
3Different from private events, universal events can be bound to most components.
4
5<a name="en-us_topic_0000001058460527_tf7a840896dc848b5ab17a18b50036601"></a>
6<table><thead align="left"><tr id="en-us_topic_0000001058460527_rf3d0da15d2f64cd492dfa1e7d98890a5"><th class="cellrowborder" valign="top" width="15.02%" id="mcps1.1.4.1.1"><p id="en-us_topic_0000001058460527_a487aa1c493e84ca68567b4b65051674d"><a name="en-us_topic_0000001058460527_a487aa1c493e84ca68567b4b65051674d"></a><a name="en-us_topic_0000001058460527_a487aa1c493e84ca68567b4b65051674d"></a>Name</p>
7</th>
8<th class="cellrowborder" valign="top" width="23.05%" id="mcps1.1.4.1.2"><p id="en-us_topic_0000001058460527_adc4b506cda3043508da6ee7649c12ca4"><a name="en-us_topic_0000001058460527_adc4b506cda3043508da6ee7649c12ca4"></a><a name="en-us_topic_0000001058460527_adc4b506cda3043508da6ee7649c12ca4"></a>Parameter</p>
9</th>
10<th class="cellrowborder" valign="top" width="61.92999999999999%" id="mcps1.1.4.1.3"><p id="en-us_topic_0000001058460527_a59e4cbe58a5c42a7a4585bc8365783bc"><a name="en-us_topic_0000001058460527_a59e4cbe58a5c42a7a4585bc8365783bc"></a><a name="en-us_topic_0000001058460527_a59e4cbe58a5c42a7a4585bc8365783bc"></a>Triggered when</p>
11</th>
12</tr>
13</thead>
14<tbody><tr id="en-us_topic_0000001058460527_r7683acd1d0964f31840d03c9aeb32fca"><td class="cellrowborder" valign="top" width="15.02%" headers="mcps1.1.4.1.1 "><p id="en-us_topic_0000001058460527_a58fb4b1d870f466e955cf5ea879c4d4a"><a name="en-us_topic_0000001058460527_a58fb4b1d870f466e955cf5ea879c4d4a"></a><a name="en-us_topic_0000001058460527_a58fb4b1d870f466e955cf5ea879c4d4a"></a>touchstart</p>
15</td>
16<td class="cellrowborder" valign="top" width="23.05%" headers="mcps1.1.4.1.2 "><p id="en-us_topic_0000001058460527_abefebd99301b4bdebb798d1b9df24d8d"><a name="en-us_topic_0000001058460527_abefebd99301b4bdebb798d1b9df24d8d"></a><a name="en-us_topic_0000001058460527_abefebd99301b4bdebb798d1b9df24d8d"></a><a href="#en-us_topic_0000001058460527_tdb541af4e4db41d7a92e9b6e3c93f606">TouchEvent</a></p>
17</td>
18<td class="cellrowborder" valign="top" width="61.92999999999999%" headers="mcps1.1.4.1.3 "><p id="en-us_topic_0000001058460527_afa4290e2620f4f5fbdcb74dcae84e536"><a name="en-us_topic_0000001058460527_afa4290e2620f4f5fbdcb74dcae84e536"></a><a name="en-us_topic_0000001058460527_afa4290e2620f4f5fbdcb74dcae84e536"></a>The tapping starts</p>
19</td>
20</tr>
21<tr id="en-us_topic_0000001058460527_r7f70ef6c895e4d2d95325887fee7d62e"><td class="cellrowborder" valign="top" width="15.02%" headers="mcps1.1.4.1.1 "><p id="en-us_topic_0000001058460527_a23e0317cfee94650be4dcd2280c3e94e"><a name="en-us_topic_0000001058460527_a23e0317cfee94650be4dcd2280c3e94e"></a><a name="en-us_topic_0000001058460527_a23e0317cfee94650be4dcd2280c3e94e"></a>touchmove</p>
22</td>
23<td class="cellrowborder" valign="top" width="23.05%" headers="mcps1.1.4.1.2 "><p id="en-us_topic_0000001058460527_aea26e4f9575044dc8fb65080f3a6684a"><a name="en-us_topic_0000001058460527_aea26e4f9575044dc8fb65080f3a6684a"></a><a name="en-us_topic_0000001058460527_aea26e4f9575044dc8fb65080f3a6684a"></a><a href="#en-us_topic_0000001058460527_tdb541af4e4db41d7a92e9b6e3c93f606">TouchEvent</a></p>
24</td>
25<td class="cellrowborder" valign="top" width="61.92999999999999%" headers="mcps1.1.4.1.3 "><p id="en-us_topic_0000001058460527_a37f7cc43d82c4ee18512bd079349079d"><a name="en-us_topic_0000001058460527_a37f7cc43d82c4ee18512bd079349079d"></a><a name="en-us_topic_0000001058460527_a37f7cc43d82c4ee18512bd079349079d"></a>The tapping moves</p>
26</td>
27</tr>
28<tr id="en-us_topic_0000001058460527_ra5c278d41f9045ed9d95e13165974bf4"><td class="cellrowborder" valign="top" width="15.02%" headers="mcps1.1.4.1.1 "><p id="en-us_topic_0000001058460527_ad0728eeac06143bbb4a6fdf1ed5c6d91"><a name="en-us_topic_0000001058460527_ad0728eeac06143bbb4a6fdf1ed5c6d91"></a><a name="en-us_topic_0000001058460527_ad0728eeac06143bbb4a6fdf1ed5c6d91"></a>touchcancel</p>
29</td>
30<td class="cellrowborder" valign="top" width="23.05%" headers="mcps1.1.4.1.2 "><p id="en-us_topic_0000001058460527_a59e2819eae2b4d3e935991b43156347b"><a name="en-us_topic_0000001058460527_a59e2819eae2b4d3e935991b43156347b"></a><a name="en-us_topic_0000001058460527_a59e2819eae2b4d3e935991b43156347b"></a><a href="#en-us_topic_0000001058460527_tdb541af4e4db41d7a92e9b6e3c93f606">TouchEvent</a></p>
31</td>
32<td class="cellrowborder" valign="top" width="61.92999999999999%" headers="mcps1.1.4.1.3 "><p id="en-us_topic_0000001058460527_a739d9ef0db624f6284554aeaeddffa0a"><a name="en-us_topic_0000001058460527_a739d9ef0db624f6284554aeaeddffa0a"></a><a name="en-us_topic_0000001058460527_a739d9ef0db624f6284554aeaeddffa0a"></a>The tapping is interrupted</p>
33</td>
34</tr>
35<tr id="en-us_topic_0000001058460527_rddfe06969173404d96b60c402a7e783c"><td class="cellrowborder" valign="top" width="15.02%" headers="mcps1.1.4.1.1 "><p id="en-us_topic_0000001058460527_a233e2f6ff39f49fd97b8f233875d01d4"><a name="en-us_topic_0000001058460527_a233e2f6ff39f49fd97b8f233875d01d4"></a><a name="en-us_topic_0000001058460527_a233e2f6ff39f49fd97b8f233875d01d4"></a>touchend</p>
36</td>
37<td class="cellrowborder" valign="top" width="23.05%" headers="mcps1.1.4.1.2 "><p id="en-us_topic_0000001058460527_a439e69aaf158448e99b3c81cbc9fd624"><a name="en-us_topic_0000001058460527_a439e69aaf158448e99b3c81cbc9fd624"></a><a name="en-us_topic_0000001058460527_a439e69aaf158448e99b3c81cbc9fd624"></a><a href="#en-us_topic_0000001058460527_tdb541af4e4db41d7a92e9b6e3c93f606">TouchEvent</a></p>
38</td>
39<td class="cellrowborder" valign="top" width="61.92999999999999%" headers="mcps1.1.4.1.3 "><p id="en-us_topic_0000001058460527_a05c0fe4e05ef4154acee8a06ad56a2de"><a name="en-us_topic_0000001058460527_a05c0fe4e05ef4154acee8a06ad56a2de"></a><a name="en-us_topic_0000001058460527_a05c0fe4e05ef4154acee8a06ad56a2de"></a>The tapping ends</p>
40</td>
41</tr>
42<tr id="en-us_topic_0000001058460527_rec1121b8bebc4a3f9ed9a906d061746e"><td class="cellrowborder" valign="top" width="15.02%" headers="mcps1.1.4.1.1 "><p id="en-us_topic_0000001058460527_a2fb4de45b1594f6fa1a7da45ce0db57f"><a name="en-us_topic_0000001058460527_a2fb4de45b1594f6fa1a7da45ce0db57f"></a><a name="en-us_topic_0000001058460527_a2fb4de45b1594f6fa1a7da45ce0db57f"></a>click</p>
43</td>
44<td class="cellrowborder" valign="top" width="23.05%" headers="mcps1.1.4.1.2 "><p id="en-us_topic_0000001058460527_af86bf1da40504ed2a8d14213a42536ab"><a name="en-us_topic_0000001058460527_af86bf1da40504ed2a8d14213a42536ab"></a><a name="en-us_topic_0000001058460527_af86bf1da40504ed2a8d14213a42536ab"></a>-</p>
45</td>
46<td class="cellrowborder" valign="top" width="61.92999999999999%" headers="mcps1.1.4.1.3 "><p id="en-us_topic_0000001058460527_a1d32f00c38c440ddaa63c3f3e01d4e09"><a name="en-us_topic_0000001058460527_a1d32f00c38c440ddaa63c3f3e01d4e09"></a><a name="en-us_topic_0000001058460527_a1d32f00c38c440ddaa63c3f3e01d4e09"></a>A component is clicked</p>
47</td>
48</tr>
49<tr id="en-us_topic_0000001058460527_r95f500ef9402487ea42e829d69606f90"><td class="cellrowborder" valign="top" width="15.02%" headers="mcps1.1.4.1.1 "><p id="en-us_topic_0000001058460527_aa7dc63d1b4924872bbff6a6a100e928f"><a name="en-us_topic_0000001058460527_aa7dc63d1b4924872bbff6a6a100e928f"></a><a name="en-us_topic_0000001058460527_aa7dc63d1b4924872bbff6a6a100e928f"></a>longpress</p>
50</td>
51<td class="cellrowborder" valign="top" width="23.05%" headers="mcps1.1.4.1.2 "><p id="en-us_topic_0000001058460527_a39186f4ff74544d89ace56ea87d9937b"><a name="en-us_topic_0000001058460527_a39186f4ff74544d89ace56ea87d9937b"></a><a name="en-us_topic_0000001058460527_a39186f4ff74544d89ace56ea87d9937b"></a>-</p>
52</td>
53<td class="cellrowborder" valign="top" width="61.92999999999999%" headers="mcps1.1.4.1.3 "><p id="en-us_topic_0000001058460527_a44b8585170304b5596c41714772e605e"><a name="en-us_topic_0000001058460527_a44b8585170304b5596c41714772e605e"></a><a name="en-us_topic_0000001058460527_a44b8585170304b5596c41714772e605e"></a>A component is long pressed</p>
54</td>
55</tr>
56<tr id="en-us_topic_0000001058460527_row117014569616"><td class="cellrowborder" valign="top" width="15.02%" headers="mcps1.1.4.1.1 "><p id="en-us_topic_0000001058460527_p12706561061"><a name="en-us_topic_0000001058460527_p12706561061"></a><a name="en-us_topic_0000001058460527_p12706561061"></a>swipe<sup id="en-us_topic_0000001058460527_sup35424382912"><a name="en-us_topic_0000001058460527_sup35424382912"></a><a name="en-us_topic_0000001058460527_sup35424382912"></a>5+</sup></p>
57</td>
58<td class="cellrowborder" valign="top" width="23.05%" headers="mcps1.1.4.1.2 "><p id="en-us_topic_0000001058460527_p11711056161"><a name="en-us_topic_0000001058460527_p11711056161"></a><a name="en-us_topic_0000001058460527_p11711056161"></a><a href="#en-us_topic_0000001058460527_table111811577714">SwipeEvent</a></p>
59</td>
60<td class="cellrowborder" valign="top" width="61.92999999999999%" headers="mcps1.1.4.1.3 "><p id="en-us_topic_0000001058460527_p2711556162"><a name="en-us_topic_0000001058460527_p2711556162"></a><a name="en-us_topic_0000001058460527_p2711556162"></a>A user quickly swipes on a component.</p>
61</td>
62</tr>
63</tbody>
64</table>
65
66**Table  1**  Attributes of the BaseEvent object
67
68<a name="en-us_topic_0000001058460527_t4afe3a7d9546429ca1113ff78333d1c5"></a>
69<table><thead align="left"><tr id="en-us_topic_0000001058460527_r17b57a5916254b538712224afce3ec93"><th class="cellrowborder" valign="top" width="17.169999999999998%" id="mcps1.2.4.1.1"><p id="en-us_topic_0000001058460527_a85fa8e3227fc48a2b8bc9c953327ae36"><a name="en-us_topic_0000001058460527_a85fa8e3227fc48a2b8bc9c953327ae36"></a><a name="en-us_topic_0000001058460527_a85fa8e3227fc48a2b8bc9c953327ae36"></a>Attribute</p>
70</th>
71<th class="cellrowborder" valign="top" width="14.14%" id="mcps1.2.4.1.2"><p id="en-us_topic_0000001058460527_aae0028a39da64592bc9e3de357419d3b"><a name="en-us_topic_0000001058460527_aae0028a39da64592bc9e3de357419d3b"></a><a name="en-us_topic_0000001058460527_aae0028a39da64592bc9e3de357419d3b"></a>Type</p>
72</th>
73<th class="cellrowborder" valign="top" width="68.69%" id="mcps1.2.4.1.3"><p id="en-us_topic_0000001058460527_a84e596443d8d4e80ab2d990e87e19d0a"><a name="en-us_topic_0000001058460527_a84e596443d8d4e80ab2d990e87e19d0a"></a><a name="en-us_topic_0000001058460527_a84e596443d8d4e80ab2d990e87e19d0a"></a>Description</p>
74</th>
75</tr>
76</thead>
77<tbody><tr id="en-us_topic_0000001058460527_ref9724a78ebd4f959cc159def567a6e5"><td class="cellrowborder" valign="top" width="17.169999999999998%" headers="mcps1.2.4.1.1 "><p id="en-us_topic_0000001058460527_a8e318c4332dd44cda62259cd5018bc7c"><a name="en-us_topic_0000001058460527_a8e318c4332dd44cda62259cd5018bc7c"></a><a name="en-us_topic_0000001058460527_a8e318c4332dd44cda62259cd5018bc7c"></a>type</p>
78</td>
79<td class="cellrowborder" valign="top" width="14.14%" headers="mcps1.2.4.1.2 "><p id="en-us_topic_0000001058460527_a567269320f1c43b3984e231f61130431"><a name="en-us_topic_0000001058460527_a567269320f1c43b3984e231f61130431"></a><a name="en-us_topic_0000001058460527_a567269320f1c43b3984e231f61130431"></a>string</p>
80</td>
81<td class="cellrowborder" valign="top" width="68.69%" headers="mcps1.2.4.1.3 "><p id="en-us_topic_0000001058460527_a732751a8a4114815953f940529086cc4"><a name="en-us_topic_0000001058460527_a732751a8a4114815953f940529086cc4"></a><a name="en-us_topic_0000001058460527_a732751a8a4114815953f940529086cc4"></a>Event type, such as <strong id="en-us_topic_0000001058460527_b17928122183715"><a name="en-us_topic_0000001058460527_b17928122183715"></a><a name="en-us_topic_0000001058460527_b17928122183715"></a>click</strong> and <strong id="en-us_topic_0000001058460527_b78784073719"><a name="en-us_topic_0000001058460527_b78784073719"></a><a name="en-us_topic_0000001058460527_b78784073719"></a>longpress</strong></p>
82</td>
83</tr>
84<tr id="en-us_topic_0000001058460527_rc5890121a2e14421be07b897d2c04995"><td class="cellrowborder" valign="top" width="17.169999999999998%" headers="mcps1.2.4.1.1 "><p id="en-us_topic_0000001058460527_a8f15a7cee90e48ac80b09f0f3ba1bc3a"><a name="en-us_topic_0000001058460527_a8f15a7cee90e48ac80b09f0f3ba1bc3a"></a><a name="en-us_topic_0000001058460527_a8f15a7cee90e48ac80b09f0f3ba1bc3a"></a>timestamp</p>
85</td>
86<td class="cellrowborder" valign="top" width="14.14%" headers="mcps1.2.4.1.2 "><p id="en-us_topic_0000001058460527_a257a70e6a33d481e8c32f4551d33f6e4"><a name="en-us_topic_0000001058460527_a257a70e6a33d481e8c32f4551d33f6e4"></a><a name="en-us_topic_0000001058460527_a257a70e6a33d481e8c32f4551d33f6e4"></a>number</p>
87</td>
88<td class="cellrowborder" valign="top" width="68.69%" headers="mcps1.2.4.1.3 "><p id="en-us_topic_0000001058460527_a816c5efe2ab2447bbd14dfd91095052c"><a name="en-us_topic_0000001058460527_a816c5efe2ab2447bbd14dfd91095052c"></a><a name="en-us_topic_0000001058460527_a816c5efe2ab2447bbd14dfd91095052c"></a>Timestamp when the event is triggered</p>
89</td>
90</tr>
91</tbody>
92</table>
93
94**Table  2**  Attributes of the TouchEvent object \(inherited from BaseEvent\)
95
96<a name="en-us_topic_0000001058460527_tdb541af4e4db41d7a92e9b6e3c93f606"></a>
97<table><thead align="left"><tr id="en-us_topic_0000001058460527_rea83e482278e4251975cce4fd873c6bb"><th class="cellrowborder" valign="top" width="21.07%" id="mcps1.2.4.1.1"><p id="en-us_topic_0000001058460527_a82b31036c9c94b3d8a7702523f9b40ec"><a name="en-us_topic_0000001058460527_a82b31036c9c94b3d8a7702523f9b40ec"></a><a name="en-us_topic_0000001058460527_a82b31036c9c94b3d8a7702523f9b40ec"></a>Attribute</p>
98</th>
99<th class="cellrowborder" valign="top" width="15.93%" id="mcps1.2.4.1.2"><p id="en-us_topic_0000001058460527_a916c9aa3c32e4903953063bb7424027c"><a name="en-us_topic_0000001058460527_a916c9aa3c32e4903953063bb7424027c"></a><a name="en-us_topic_0000001058460527_a916c9aa3c32e4903953063bb7424027c"></a>Type</p>
100</th>
101<th class="cellrowborder" valign="top" width="63%" id="mcps1.2.4.1.3"><p id="en-us_topic_0000001058460527_af9aad173dc2f44f5be69c86fe5537af7"><a name="en-us_topic_0000001058460527_af9aad173dc2f44f5be69c86fe5537af7"></a><a name="en-us_topic_0000001058460527_af9aad173dc2f44f5be69c86fe5537af7"></a>Description</p>
102</th>
103</tr>
104</thead>
105<tbody><tr id="en-us_topic_0000001058460527_r2f3c99711cf243c19b359026f2863056"><td class="cellrowborder" valign="top" width="21.07%" headers="mcps1.2.4.1.1 "><p id="en-us_topic_0000001058460527_a660dbbfaf8d349b7921fbe9a0b96574a"><a name="en-us_topic_0000001058460527_a660dbbfaf8d349b7921fbe9a0b96574a"></a><a name="en-us_topic_0000001058460527_a660dbbfaf8d349b7921fbe9a0b96574a"></a>touches</p>
106</td>
107<td class="cellrowborder" valign="top" width="15.93%" headers="mcps1.2.4.1.2 "><p id="en-us_topic_0000001058460527_aab0506a4edc147beb25866891e5fddcd"><a name="en-us_topic_0000001058460527_aab0506a4edc147beb25866891e5fddcd"></a><a name="en-us_topic_0000001058460527_aab0506a4edc147beb25866891e5fddcd"></a>Array&lt;TouchInfo&gt;</p>
108</td>
109<td class="cellrowborder" valign="top" width="63%" headers="mcps1.2.4.1.3 "><p id="en-us_topic_0000001058460527_aa3d09d0a55704a6097fb39739436c5db"><a name="en-us_topic_0000001058460527_aa3d09d0a55704a6097fb39739436c5db"></a><a name="en-us_topic_0000001058460527_aa3d09d0a55704a6097fb39739436c5db"></a>Attribute set of the touch event, including the information array of the touch points on the screen.</p>
110</td>
111</tr>
112<tr id="en-us_topic_0000001058460527_raad83bde64d9482f8a56c44ae45b3f77"><td class="cellrowborder" valign="top" width="21.07%" headers="mcps1.2.4.1.1 "><p id="en-us_topic_0000001058460527_a7e263f0434c94a16a584943ddde92012"><a name="en-us_topic_0000001058460527_a7e263f0434c94a16a584943ddde92012"></a><a name="en-us_topic_0000001058460527_a7e263f0434c94a16a584943ddde92012"></a>changedTouches</p>
113</td>
114<td class="cellrowborder" valign="top" width="15.93%" headers="mcps1.2.4.1.2 "><p id="en-us_topic_0000001058460527_a76ffd0f779234ab6a77e808500fca675"><a name="en-us_topic_0000001058460527_a76ffd0f779234ab6a77e808500fca675"></a><a name="en-us_topic_0000001058460527_a76ffd0f779234ab6a77e808500fca675"></a>Array&lt;TouchInfo&gt;</p>
115</td>
116<td class="cellrowborder" valign="top" width="63%" headers="mcps1.2.4.1.3 "><p id="en-us_topic_0000001058460527_a85eddf1d320641a8b344aaadffe6d49e"><a name="en-us_topic_0000001058460527_a85eddf1d320641a8b344aaadffe6d49e"></a><a name="en-us_topic_0000001058460527_a85eddf1d320641a8b344aaadffe6d49e"></a>Attribute set when a touch event occurs, including the information array of changed touch points on the screen. <strong id="en-us_topic_0000001058460527_b185721925164418"><a name="en-us_topic_0000001058460527_b185721925164418"></a><a name="en-us_topic_0000001058460527_b185721925164418"></a>changedTouches</strong> has the same data format as <strong id="en-us_topic_0000001058460527_b18207185144513"><a name="en-us_topic_0000001058460527_b18207185144513"></a><a name="en-us_topic_0000001058460527_b18207185144513"></a>touches</strong> and indicates touch point changes, such as from no touch point to newly generated touch points, from some touch points to no touch point, and location changes. For example, when the user's finger leaves the touchscreen, no data exists in the <strong id="en-us_topic_0000001058460527_b127219713482"><a name="en-us_topic_0000001058460527_b127219713482"></a><a name="en-us_topic_0000001058460527_b127219713482"></a>touches</strong> array, but <strong id="en-us_topic_0000001058460527_b1813110115482"><a name="en-us_topic_0000001058460527_b1813110115482"></a><a name="en-us_topic_0000001058460527_b1813110115482"></a>changedTouches</strong> will save the generated data.</p>
117</td>
118</tr>
119</tbody>
120</table>
121
122**Table  3**  Attributes of the TouchEvent object
123
124<a name="en-us_topic_0000001058460527_tf03fc1fac826405d95028a3b880047b6"></a>
125<table><thead align="left"><tr id="en-us_topic_0000001058460527_rff1c937243f04922b941ec313c0cc858"><th class="cellrowborder" valign="top" width="21%" id="mcps1.2.4.1.1"><p id="en-us_topic_0000001058460527_a7f9f203c859c4f2ab2f44035c97cffa7"><a name="en-us_topic_0000001058460527_a7f9f203c859c4f2ab2f44035c97cffa7"></a><a name="en-us_topic_0000001058460527_a7f9f203c859c4f2ab2f44035c97cffa7"></a>Attribute</p>
126</th>
127<th class="cellrowborder" valign="top" width="16%" id="mcps1.2.4.1.2"><p id="en-us_topic_0000001058460527_a00de9107caaf46968b7d3a52f0c9718f"><a name="en-us_topic_0000001058460527_a00de9107caaf46968b7d3a52f0c9718f"></a><a name="en-us_topic_0000001058460527_a00de9107caaf46968b7d3a52f0c9718f"></a>Type</p>
128</th>
129<th class="cellrowborder" valign="top" width="63%" id="mcps1.2.4.1.3"><p id="en-us_topic_0000001058460527_a3406658ff5084d1aaad3fca32c5d31d6"><a name="en-us_topic_0000001058460527_a3406658ff5084d1aaad3fca32c5d31d6"></a><a name="en-us_topic_0000001058460527_a3406658ff5084d1aaad3fca32c5d31d6"></a>Description</p>
130</th>
131</tr>
132</thead>
133<tbody><tr id="en-us_topic_0000001058460527_r19de9fd9501e4d99a3a9232b7fb94c98"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.2.4.1.1 "><p id="en-us_topic_0000001058460527_a8653f3e51af34bb78136455652a61cec"><a name="en-us_topic_0000001058460527_a8653f3e51af34bb78136455652a61cec"></a><a name="en-us_topic_0000001058460527_a8653f3e51af34bb78136455652a61cec"></a>globalX</p>
134</td>
135<td class="cellrowborder" valign="top" width="16%" headers="mcps1.2.4.1.2 "><p id="en-us_topic_0000001058460527_add8c97142b8742f78503909547ebd380"><a name="en-us_topic_0000001058460527_add8c97142b8742f78503909547ebd380"></a><a name="en-us_topic_0000001058460527_add8c97142b8742f78503909547ebd380"></a>number</p>
136</td>
137<td class="cellrowborder" valign="top" width="63%" headers="mcps1.2.4.1.3 "><p id="en-us_topic_0000001058460527_a834cd2553aa7439781eeeddd342329df"><a name="en-us_topic_0000001058460527_a834cd2553aa7439781eeeddd342329df"></a><a name="en-us_topic_0000001058460527_a834cd2553aa7439781eeeddd342329df"></a>Horizontal distance from the upper left corner of the screen (excluding the status bar). The upper left corner of the screen acts as the coordinate origin.</p>
138</td>
139</tr>
140<tr id="en-us_topic_0000001058460527_rde7a56164c134cd2a1afce437e437211"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.2.4.1.1 "><p id="en-us_topic_0000001058460527_aebdebb651e74449fb00e1b9930564eac"><a name="en-us_topic_0000001058460527_aebdebb651e74449fb00e1b9930564eac"></a><a name="en-us_topic_0000001058460527_aebdebb651e74449fb00e1b9930564eac"></a>globalY</p>
141</td>
142<td class="cellrowborder" valign="top" width="16%" headers="mcps1.2.4.1.2 "><p id="en-us_topic_0000001058460527_a3bcbd4de1a634f3195b525d00f1c9667"><a name="en-us_topic_0000001058460527_a3bcbd4de1a634f3195b525d00f1c9667"></a><a name="en-us_topic_0000001058460527_a3bcbd4de1a634f3195b525d00f1c9667"></a>number</p>
143</td>
144<td class="cellrowborder" valign="top" width="63%" headers="mcps1.2.4.1.3 "><p id="en-us_topic_0000001058460527_a5a1306479f784edf8a5a42f76e2540be"><a name="en-us_topic_0000001058460527_a5a1306479f784edf8a5a42f76e2540be"></a><a name="en-us_topic_0000001058460527_a5a1306479f784edf8a5a42f76e2540be"></a>Vertical distance from the upper left corner of the screen (excluding the status bar). The upper left corner of the screen acts as the coordinate origin.</p>
145</td>
146</tr>
147<tr id="en-us_topic_0000001058460527_r94760564980c470490555043898942f3"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.2.4.1.1 "><p id="en-us_topic_0000001058460527_a1a1011d86d0c4149a43d0175e75028c5"><a name="en-us_topic_0000001058460527_a1a1011d86d0c4149a43d0175e75028c5"></a><a name="en-us_topic_0000001058460527_a1a1011d86d0c4149a43d0175e75028c5"></a>localX</p>
148</td>
149<td class="cellrowborder" valign="top" width="16%" headers="mcps1.2.4.1.2 "><p id="en-us_topic_0000001058460527_a0618e3c91a61456a9a9ad2c23095cca5"><a name="en-us_topic_0000001058460527_a0618e3c91a61456a9a9ad2c23095cca5"></a><a name="en-us_topic_0000001058460527_a0618e3c91a61456a9a9ad2c23095cca5"></a>number</p>
150</td>
151<td class="cellrowborder" valign="top" width="63%" headers="mcps1.2.4.1.3 "><p id="en-us_topic_0000001058460527_ad7268ba243c546af8f93208c427c5340"><a name="en-us_topic_0000001058460527_ad7268ba243c546af8f93208c427c5340"></a><a name="en-us_topic_0000001058460527_ad7268ba243c546af8f93208c427c5340"></a>Horizontal distance from the upper left corner of the touched component. The upper left corner of the component acts as the coordinate origin.</p>
152</td>
153</tr>
154<tr id="en-us_topic_0000001058460527_ra0ea6d13e3224d3fac80631ac8458af7"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.2.4.1.1 "><p id="en-us_topic_0000001058460527_ab9af76cc10bf4da49cef6ff3a201ff46"><a name="en-us_topic_0000001058460527_ab9af76cc10bf4da49cef6ff3a201ff46"></a><a name="en-us_topic_0000001058460527_ab9af76cc10bf4da49cef6ff3a201ff46"></a>localY</p>
155</td>
156<td class="cellrowborder" valign="top" width="16%" headers="mcps1.2.4.1.2 "><p id="en-us_topic_0000001058460527_a7d7052c11197432aa14f39bb4039d7aa"><a name="en-us_topic_0000001058460527_a7d7052c11197432aa14f39bb4039d7aa"></a><a name="en-us_topic_0000001058460527_a7d7052c11197432aa14f39bb4039d7aa"></a>number</p>
157</td>
158<td class="cellrowborder" valign="top" width="63%" headers="mcps1.2.4.1.3 "><p id="en-us_topic_0000001058460527_ae3aa585280c449e5a8fe954711ab56fd"><a name="en-us_topic_0000001058460527_ae3aa585280c449e5a8fe954711ab56fd"></a><a name="en-us_topic_0000001058460527_ae3aa585280c449e5a8fe954711ab56fd"></a>Vertical distance from the upper left corner of the touched component. The upper left corner of the component acts as the coordinate origin.</p>
159</td>
160</tr>
161<tr id="en-us_topic_0000001058460527_row199451713154119"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.2.4.1.1 "><p id="en-us_topic_0000001058460527_p3369201515412"><a name="en-us_topic_0000001058460527_p3369201515412"></a><a name="en-us_topic_0000001058460527_p3369201515412"></a>size</p>
162</td>
163<td class="cellrowborder" valign="top" width="16%" headers="mcps1.2.4.1.2 "><p id="en-us_topic_0000001058460527_p14369121514116"><a name="en-us_topic_0000001058460527_p14369121514116"></a><a name="en-us_topic_0000001058460527_p14369121514116"></a>number</p>
164</td>
165<td class="cellrowborder" valign="top" width="63%" headers="mcps1.2.4.1.3 "><p id="en-us_topic_0000001058460527_p336941534115"><a name="en-us_topic_0000001058460527_p336941534115"></a><a name="en-us_topic_0000001058460527_p336941534115"></a>Touch area.</p>
166</td>
167</tr>
168</tbody>
169</table>
170
171**Table  4**  Attributes of the SwipeEvent object \(inherited from BaseEvent\)
172
173<a name="en-us_topic_0000001058460527_table111811577714"></a>
174<table><thead align="left"><tr id="en-us_topic_0000001058460527_row1011820575718"><th class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.2.4.1.1"><p id="en-us_topic_0000001058460527_p81183572071"><a name="en-us_topic_0000001058460527_p81183572071"></a><a name="en-us_topic_0000001058460527_p81183572071"></a>Attribute</p>
175</th>
176<th class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.2.4.1.2"><p id="en-us_topic_0000001058460527_p0118105719719"><a name="en-us_topic_0000001058460527_p0118105719719"></a><a name="en-us_topic_0000001058460527_p0118105719719"></a>Type</p>
177</th>
178<th class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.2.4.1.3"><p id="en-us_topic_0000001058460527_p111875717717"><a name="en-us_topic_0000001058460527_p111875717717"></a><a name="en-us_topic_0000001058460527_p111875717717"></a>Description</p>
179</th>
180</tr>
181</thead>
182<tbody><tr id="en-us_topic_0000001058460527_row9118257276"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.1 "><p id="en-us_topic_0000001058460527_p21198576710"><a name="en-us_topic_0000001058460527_p21198576710"></a><a name="en-us_topic_0000001058460527_p21198576710"></a>direction</p>
183</td>
184<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.2 "><p id="en-us_topic_0000001058460527_p511918578713"><a name="en-us_topic_0000001058460527_p511918578713"></a><a name="en-us_topic_0000001058460527_p511918578713"></a>string</p>
185</td>
186<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.3 "><p id="en-us_topic_0000001058460527_p41191257174"><a name="en-us_topic_0000001058460527_p41191257174"></a><a name="en-us_topic_0000001058460527_p41191257174"></a>Swiping direction. The value can be one of the following:</p>
187<a name="en-us_topic_0000001058460527_ol241216371597"></a><a name="en-us_topic_0000001058460527_ol241216371597"></a><ol id="en-us_topic_0000001058460527_ol241216371597"><li><strong id="en-us_topic_0000001058460527_b151161324356"><a name="en-us_topic_0000001058460527_b151161324356"></a><a name="en-us_topic_0000001058460527_b151161324356"></a>left</strong>: Swipe from right to left</li><li><strong id="en-us_topic_0000001058460527_b19343123183517"><a name="en-us_topic_0000001058460527_b19343123183517"></a><a name="en-us_topic_0000001058460527_b19343123183517"></a>right</strong>: Swipe from left to right</li><li><strong id="en-us_topic_0000001058460527_b168477363520"><a name="en-us_topic_0000001058460527_b168477363520"></a><a name="en-us_topic_0000001058460527_b168477363520"></a>up</strong>: Swipe upwards</li><li><strong id="en-us_topic_0000001058460527_b832616413351"><a name="en-us_topic_0000001058460527_b832616413351"></a><a name="en-us_topic_0000001058460527_b832616413351"></a>down</strong>: Swipe downwards</li></ol>
188</td>
189</tr>
190</tbody>
191</table>
192
193