1# ArkUI Subsystem Changelog 2 3## cl.arkui.1 Display Effect Change for the showTips Method of the \<Slider> Component 4 5**Access Level** 6 7Public 8 9**Reason for Change** 10 11This change is a compatible change, which involves how the tooltip is displayed for the **\<Slider>** component. 12 13**Change Impact** 14 15The **showTips** method of the **\<Slider>** component is affected. This method has two parameters: The first parameter of the Boolean type indicates whether to display a tooltip; the second parameter of the ResourceStr type indicates the text content of the tooltip. 16Specifically, the affected scenarios are as follows: 17 18- Style of the tooltip when the first parameter of **showTips** is set to **true** 19 20Before change 21 22 23 24After change 25 26 27 28- Width of the text content specified by the second parameter of **showTips** 29 30Before change: The text can be displayed in multiple lines in full based on the grid width. 31 32After change: The text is displayed in a single line, with the maximum width of 36 vp. That is, a maximum of four digits can be displayed. 33 34**API Level** 35 367 37 38**Change Since** 39 40OpenHarmony SDK 4.1.5.5 41 42**Key API/Component Changes** 43 44\<Slider> 45 46**Adaptation Guide** 47 48N/A 49 50## cl.Arkui.2 Change in the Default Colors of the \<Progress> Component 51 52**Access Level** 53 54Public 55 56**Reason for Change** 57 58The original default colors of the **\<Progress>** component do not comply with the UX specifications. 59 60**Change Impact** 61 62This change is a compatible change. It delivers a more visually appealing component. 63 64**API Level** 65 668 67 68**Change Since** 69 70OpenHarmony SDK 4.1.5.5 71 72**Key API/Component Changes** 73 74> **NOTE** 75> 76> The color values listed below refer to the resource IDs in the system. 77 78In versions earlier than API version 11: 79 80- The default colors of the capsule-style progress indicator are as follows: foreground color: **ohos_id_color_emphasize_contrary**; border: **ohos_id_color_emphasize_contrary**. 81- The default background color of the ring-style progress indicator is **ohos_id_color_component_normal**. 82 83 84 85Since API version 11: 86 87- The default colors of the capsule-style progress indicator are as follows: foreground color: **ohos_id_color_emphasize**; foreground color opacity: **ohos_id_alpha_highlight_bg**; border: **ohos_id_color_emphasize**; border opacity: **ohos_id_alpha_highlight_bg**. 88- The default background color of the ring-style progress indicator is **ohos_id_color_button_normal**. 89 90 91 92**Adaptation Guide** 93 94N/A 95 96## cl.Arkui.3 Change in the Default Colors of the \<LoadingProgress> Component 97 98**Access Level** 99 100Public 101 102**Reason for Change** 103 104The original default foreground color of the **\<LoadingProgress>** component does not comply with the UX specifications. 105 106**Change Impact** 107 108This change is a compatible change. It delivers a more visually appealing component. 109 110**API Level** 111 1128 113 114**Change Since** 115 116OpenHarmony SDK 4.1.5.5 117 118**Key API/Component Changes** 119 120In versions earlier than API version 11: The default foreground color opacity is **0.6**, and the default foreground color is **#99666666**. 121 122 123 124Since API version 11: The default foreground color opacity is **1.0**, and the default foreground color is **#ff666666**. 125 126 127 128**Adaptation Guide** 129 130N/A 131 132## cl.arkui.4 Change in the Default Behavior for the colorFilter Attribute of the \<Image> Component 133 134**Access Level** 135 136Public 137 138**Reason for Change** 139 140The change is made to meet user expectations. 141 142**Change Impact** 143 144This change is a non-compatible change. 145 146Before change: When the **colorFilter** attribute of the **\<Image>** component is set to an invalid value, no operation is performed. 147 148After change: When the **colorFilter** attribute of the **\<Image>** component is set to an invalid value, the system uses a value that represents a $4 \times 5$ matrix with entries of $1$ on the diagonal and entries of $0$ in other places. 149 150**API Level** 151 15211 153 154**Change Since** 155 156OpenHarmony SDK 4.1.5.5 157 158**Key API/Component Changes** 159 160\<Image> 161 162**Adaptation Guide** 163 164N/A 165 166## cl.arkui.5 Change in the Default Behavior for the fillColor Attribute of the \<Image> Component 167 168**Access Level** 169 170Public 171 172**Reason for Change** 173 174The change is made to meet user expectations. 175 176**Change Impact** 177 178This change is a non-compatible change. 179 180Before change: When the **fillColor** attribute of the **\<Image>** component is set to an invalid value, no operation is performed. 181 182After change: When the **fillColor** attribute of the **\<Image>** component is set to an invalid value, the system uses the default value. 183 184**API Level** 185 18611 187 188**Change Since** 189 190OpenHarmony SDK 4.1.5.5 191 192**Key API/Component Changes** 193 194\<Image> 195 196**Adaptation Guide** 197 198N/A 199 200 201## cl.Arkui.6 Change in the Default Shadow Blur Radius of the \<Datapanel> Component 202 203**Access Level** 204 205Public 206 207**Reason for Change** 208 209The original default shadow blur radius, 5 vp, is too small to meet the UX specifications. 210 211**Change Impact** 212 213This change is a compatible change. It delivers a more visually appealing component. 214 215**API Level** 216 21710 218 219**Change Since** 220 221OpenHarmony SDK 4.1.5.5 222 223**Key API/Component Changes** 224 225In versions earlier than API version 11: The default shadow blur radius of the **\<Datapanel>** component is 5 vp. 226 227 228 229Since API version 11: The default shadow blur radius of the **\<Datapanel>** component is 20 vp. 230 231 232 233**Adaptation Guide** 234 235N/A 236 237## cl.Arkui.7 Change in the Default Alignment Mode for Dialog Box Content 238 239**Access Level** 240 241Public 242 243**Reason for Change** 244 245The change is made to maintain consistency with UX specifications. 246 247**Change Impact** 248 249This change is a compatible change. It delivers a more visually appealing dialog box when there are multiple lines but no title in the dialog box. 250 251**API Level** 252 2537 254 255**Change Since** 256 257OpenHarmony SDK 4.1.5.5 258 259**Key API/Component Changes** 260 261In versions earlier than API version 11: By default, content in the dialog box is center aligned when there is no title. 262 263Since API version 11: By default, content in the dialog box is center aligned when there is no title and the content contains only one line, and is left aligned when there is no title and the content contains multiple lines. 264 265**Adaptation Guide** 266 267N/A 268 269## cl.Arkui.8 Change in the Default Background Effect of Dialog Boxes 270 271**Access Level** 272 273Public 274 275**Reason for Change** 276 277The change is made to enhance visual effects. 278 279**Change Impact** 280 281This change is a compatible change. In unified rendering mode, the default background of the dialog box is changed to a blur material. 282 283To change the blur material and background color, you can use the **backgroundColor** and **backgroundBlurStyle** parameters. 284 285**API Level** 286 28711 288 289**Change Since** 290 291OpenHarmony SDK 4.1.5.5 292 293**Key API/Component Changes** 294 295Components: **\<AlertDialog>**, **\<ActionSheet>**, **\<CalendarPickerDialog>**, **\<DatePickerDialog>**, **\<TimePickerDialog>**, **\<TextPickerDialog>**<br>API: **showDialog** in the **promptAction** module 296 297In versions earlier than API version 11: The default background of the dialog box is in the theme color. 298 299Since API version 11: The default background of the dialog box is a blur material. 300 301**Adaptation Guide** 302 303Example of removing the blur material: 304```ts 305@Entry 306@Component 307struct AlertDialogExample { 308 build() { 309 Column({ space: 5 }) { 310 Button('one button dialog') 311 .onClick(() => { 312 AlertDialog.show({ 313 message:"alertDialog", 314 }) 315 }).backgroundColor(0x317aff) 316 }.width('100%').margin({ top: 5 }) 317 } 318} 319``` 320Before change: 321```ts 322AlertDialog.show({ 323 message:"alertDialog", 324}) 325``` 326After change: 327```ts 328AlertDialog.show({ 329 message:"alertDialog", 330 backgroundColor:Color.White, 331 backgroundBlurStyle:BlurStyle.NONE 332}) 333``` 334As shown in the preceding example, you can manually set the enumerated values of the background color and background blur material. 335 336## cl.Arkui.9 Change in the Default Line Break Rule for Dialog Boxes 337 338**Access Level** 339 340Public 341 342**Reason for Change** 343 344The change is made to maintain consistency with UX specifications. 345 346**Change Impact** 347 348This change is a compatible change. It delivers a more visually appealing component. 349 350**API Level** 351 3527 353 354**Change Since** 355 356OpenHarmony SDK 4.1.5.5 357 358**Key API/Component Changes** 359 360In versions earlier than API version 11: The default line break rule of the dialog box is **BREAK_WORD**. 361 362Since API version 11: The default line break rule of the dialog box is **BREAK_ALL**. 363 364For details about the differences between **BREAK_WORD** and **BREAK_ALL**, see [WordBreak](../../../application-dev/reference/apis-arkui/arkui-ts/ts-appendix-enums.md#wordbreak11). 365 366**Adaptation Guide** 367 368N/A 369 370## cl.arkui.10 Change in Handling of Invalid Opacity Values 371 372**Access Level** 373 374Public 375 376**Reason for Change** 377 378If the **opacity** attribute is set to a value less than 0, the opacity should be treated as completely transparent. 379 380**Change Impact** 381 382This change is a non-compatible change. 383 384Before change: The **opacity** attribute is treated as completely opaque when set to a value less than 0. 385 386After change: The **opacity** attribute is treated as completely transparent when set to a value less than 0. 387 388**API Level** 389 3907 391 392**Change Since** 393 394OpenHarmony SDK 4.1.5.5 395 396**Key API/Component Changes** 397 398opacity 399 400**Adaptation Guide** 401 402N/A 403 404## cl.Arkui.11 Change in Handling of Invalid selectable Values for the \<ListItem> and \<GridItem> Components 405 406**Access Level** 407 408Public 409 410**Reason for Change** 411 412The change is made to meet user expectations. 413 414**Change Impact** 415 416This change is a non-compatible change. 417 418Before change: Any invalid value of the **selectable** attribute is regarded as **false** for the **\<ListItem>** and **\<GridItem>** components. 419 420After change: Any invalid value of the **selectable** attribute is regarded as **true** for the **\<ListItem>** and **\<GridItem>** components. 421 422**API Level** 423 4248 425 426**Change Since** 427 428OpenHarmony SDK 4.1.5.5 429 430**Key API/Component Changes** 431 432**selectable** attribute of the **\<ListItem>** and **\<GridItem>** components 433 434 435 436 437 438**Adaptation Guide** 439 440N/A 441 442## cl.arkui.12 Change in Handling of Certain Invalid Values of the fontSize attribute of the \<Text> Component 443 444**Access Level** 445 446Public 447 448**Reason for Change** 449 450The previous handling mode for invalid strings that contain digits, such as **"5abc"**, is incorrect. 451 452**Change Impact** 453 454This change is a non-compatible change. 455 456Before change: If an invalid value set for the **fontSize** attribute contains a number, the number is regarded as the entire value. For example, **"5abc"** is regarded as 5 fp. 457 458After change: If an invalid value is set for the **fontSize** attribute, regardless of whether it contains a number, the default value 16 fp is used. 459 460**API Level** 461 46211 463 464**Change Since** 465 466OpenHarmony SDK 4.1.5.5 467 468**Key API/Component Changes** 469 470**fontSize** attribute of the **\<Text>** component 471 472**Adaptation Guide** 473 474N/A 475 476## cl.arkui.13 Click Event Specification Change 477 478**Access Level** 479 480Public 481 482**Reason for Change** 483 484A tap gesture should detect all fingers touching the screen within the touch target. The temporary specification that the finger movement must not exceed 20 px during the recognition process is removed. 485 486**Change Impact** 487 488This change is a non-compatible change. 489 490Before change: For a tap gesture to be recognized successfully, the fingers involved must not move more than 20 px from the initial touch points. 491 492After change: The tap gesture recognizer collects and caches the touch targets when fingers touch the screen. If any of the fingers moves outside the cached touch targets, the tap gesture cannot be recognized. 493 494**API Level** 495 4967 497 498**Change Since** 499 500OpenHarmony SDK 4.1.5.5 501 502**Key API/Component Changes** 503 504TapGesture 505 506**Adaptation Guide** 507 508If the tap gesture and pan gesture are placed in a parallel gesture group, they may be recognized at the same time. 509 510As such, consider the following measures: 5111. If the tap gesture and pan gesture are placed in a parallel gesture group, upgroup them when possible to avoid possible recognition conflicts. 512Before modification: 513```ts 514 .parallelGesture(GestureGroup(GestureMode.Parallel, 515 TapGesture({count: 1}) 516 .onAction((event?: GestureEvent)=> { 517 if (event) { 518 console.info("Tapgesture") 519 } 520 }), 521 PanGesture({fingers: 1}) 522 .onActionStart((event?: GestureEvent)=>{ 523 console.info("Pan start") 524 }) 525 .onActionUpdate((event?: GestureEvent)=>{ 526 console.info("Pan update") 527 }) 528 .onActionEnd((event?: GestureEvent)=>{ 529 console.info("Pan end") 530 }) 531 )) 532``` 533After modification: 534```ts 535 .parallelGesture(GestureGroup(GestureMode.Parallel, 536 PanGesture({fingers: 1}) 537 .onActionStart((event?: GestureEvent)=>{ 538 console.info("Pan start") 539 }) 540 .onActionUpdate((event?: GestureEvent)=>{ 541 console.info("Pan update") 542 }) 543 .onActionEnd((event?: GestureEvent)=>{ 544 console.info("Pan end") 545 }) 546 )) 547 .gesture( 548 TapGesture({count: 1}) 549 .onAction((event?: GestureEvent)=> { 550 if (event) { 551 console.info("Tapgesture") 552 } 553 }) 554 ) 555``` 5562. If the tap gesture and pan gesture must be placed in the same parallel gesture group, you can use the custom gesture judgment APIs to specify that the finger involved in the tap gesture must not move a certain distance from the initial touch point. 557The sample code is as follows: 558```ts 559 .gesture( 560 TapGesture({count: 1}) 561 .onAction((event?: GestureEvent)=> { 562 if (event) { 563 console.log("Tapgesture") 564 } 565 }) 566 ) 567 .onTouch((event?: TouchEvent)=> { 568 if (event) { 569 if (event.type === TouchType.Down) { 570 this.downX = event.touches[0].windowX 571 this.downY = event.touches[0].windowY 572 } 573 } 574 }) 575 .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent)=> { 576 if (gestureInfo.type == GestureControl.GestureType.TAP_GESTURE) { 577 let xGap = event.fingerList[0].globalX - this.downX 578 if (xGap > 5) { 579 return GestureJudgeResult.REJECT 580 } 581 let yGap = event.fingerList[0].globalY - this.downY 582 if (yGap > 5) { 583 return GestureJudgeResult.REJECT 584 } 585 return GestureJudgeResult.CONTINUE 586 } else { 587 return GestureJudgeResult.CONTINUE 588 } 589 }) 590``` 5913. If the tap gesture and pan gesture must be placed in the same parallel gesture group, you can also use the custom gesture judgment APIs to set the component flag to avoid recognition conflicts. 592```ts 593@Entry 594@Component 595struct Index { 596 @State message: string = ''; 597 private hasPanActive = false; 598 build() { 599 Column() { 600 Row({ space: 20 }) { 601 Text(this.message).width(100).height(40).backgroundColor(Color.Pink) 602 }.margin(20) 603 } 604 .width('100%') 605 .height(200) 606 .borderWidth(2) 607 .parallelGesture(GestureGroup(GestureMode.Parallel, 608 TapGesture({count: 1}) 609 .onAction((event?: GestureEvent)=> { 610 if (event) { 611 console.info("Tapgesture") 612 } 613 }).tag("Single-Finger-Click"), 614 PanGesture({fingers: 1}) 615 .onActionStart((event?: GestureEvent)=>{ 616 console.info("Pan start") 617 }) 618 .onActionUpdate((event?: GestureEvent)=>{ 619 console.info("Pan update") 620 }) 621 .onActionEnd((event?: GestureEvent)=>{ 622 console.info("Pan end") 623 }).tag("Single-Finger-Pan") 624 )) 625 .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { 626 // If a pan gesture is recognized, set the flag to true. 627 if (gestureInfo.tag === "Single-Finger-Pan") { 628 this.hasPanActive = true 629 } 630 // If a tap gesture is recognized and the flag is true, the component resets the flag and does not respond to the tap gesture. 631 if (gestureInfo.tag === "Single-Finger-Click" && this.hasPanActive) { 632 this.hasPanActive = false; 633 return GestureJudgeResult.REJECT 634 } 635 return GestureJudgeResult.CONTINUE 636 }) 637 } 638} 639``` 640## cl.arkui.14 Change in the Default Menu Item Height 641 642**Access Level** 643 644Other 645 646**Reason for Change** 647 648The change is made to maintain consistency with UX specifications. 649 650**Change Impact** 651 652This change is a compatible change. 653 654Before change: If a menu item does not have its height specified, its height is 0, even when an icon is passed in. 655 656Before change: If a menu item does not have its height specified, its height is the same as the height of the icon passed in. 657 658**API Level** 659 66011 661 662**Change Since** 663 664OpenHarmony SDK 4.1.5.5 665 666**Key API/Component Changes** 667 668\<MenuItem>, \<Menu>, \<MenuItemGroup> 669 670**Adaptation Guide** 671 672If the default height is inconsistent with the application UX specification, you can customize the height. 673 674## cl.arkui.15 Change in the Logic for Setting the indicator Attribute of the \<Swiper> Component 675 676**Access Level** 677 678Other 679 680**Reason for Change** 681 682The previous logic for handling invalid values of the **left**, **top**, **right**, and **bottom** parameters of the **indicator** attribute is incorrect. 683 684**Change Impact** 685 686This change is a non-compatible change. 687 688Before change: If any of the **left**, **top**, **right**, and **bottom** parameters of the **indicator** attribute is set to **0** or an invalid value, the navigation point indicator is located in the center of the bottom of the **\<Swiper>** component. 689 690After change: If any of the **left**, **top**, **right**, and **bottom** parameters of the **indicator** attribute is set to **0** or an invalid value, the navigation point indicator is located at the edge of the **\<Swiper>** component. That is, the default value 0 vp is used. 691 692**API Level** 693 69410 695 696**Change Since** 697 698OpenHarmony SDK 4.1.5.5 699 700**Key API/Component Changes** 701 702\<Tabs> 703 704**Adaptation Guide** 705 706N/A 707