1e41f4b71Sopenharmony_ci# ArkUI Subsystem Changelog 2e41f4b71Sopenharmony_ci## cl.arkui.1 Changes in the Default QR Code Color, Background Color, and Size 3e41f4b71Sopenharmony_ci 4e41f4b71Sopenharmony_ci**Access Level** 5e41f4b71Sopenharmony_ci 6e41f4b71Sopenharmony_ciPublic 7e41f4b71Sopenharmony_ci 8e41f4b71Sopenharmony_ci**Reason for Change** 9e41f4b71Sopenharmony_ci 10e41f4b71Sopenharmony_ciThe default color and size of the **\<QRCode>** component do not comply with the UX specifications. 11e41f4b71Sopenharmony_ci 12e41f4b71Sopenharmony_ci**Change Impact** 13e41f4b71Sopenharmony_ci 14e41f4b71Sopenharmony_ciThis change is a compatible change. It delivers a more visually appealing component. 15e41f4b71Sopenharmony_ci 16e41f4b71Sopenharmony_ci**API Level** 17e41f4b71Sopenharmony_ci 18e41f4b71Sopenharmony_ci7 19e41f4b71Sopenharmony_ci 20e41f4b71Sopenharmony_ci**Key API/Component Changes** 21e41f4b71Sopenharmony_ci 22e41f4b71Sopenharmony_ciIn versions earlier than API version 11, the **\<QRCode>** component uses the following default settings: color: **Color.Black**; background color: **Color.White**; width and height: same as the parent component. 23e41f4b71Sopenharmony_ci 24e41f4b71Sopenharmony_ci 25e41f4b71Sopenharmony_ci 26e41f4b71Sopenharmony_ciSince API version 11, the **\<QRCode>** component uses the following default settings: color: **ohos_id_color_foreground**; background color: **ohos_id_color_background**; width and height: 240 vp. 27e41f4b71Sopenharmony_ci 28e41f4b71Sopenharmony_ci 29e41f4b71Sopenharmony_ci 30e41f4b71Sopenharmony_ci**Adaptation Guide** 31e41f4b71Sopenharmony_ci 32e41f4b71Sopenharmony_ciFor details, see [QRCode](../../../application-dev/reference/apis-arkui/arkui-ts/ts-basic-components-qrcode.md). 33e41f4b71Sopenharmony_ci 34e41f4b71Sopenharmony_ciSample code: 35e41f4b71Sopenharmony_ci```ts 36e41f4b71Sopenharmony_ci// xxx.ets 37e41f4b71Sopenharmony_ci@Entry 38e41f4b71Sopenharmony_ci@Component 39e41f4b71Sopenharmony_cistruct QRCodeExample { 40e41f4b71Sopenharmony_ci private value: string = 'hello world' 41e41f4b71Sopenharmony_ci build() { 42e41f4b71Sopenharmony_ci Column() { 43e41f4b71Sopenharmony_ci QRCode(this.value) 44e41f4b71Sopenharmony_ci }.width('100%').height('100%') 45e41f4b71Sopenharmony_ci } 46e41f4b71Sopenharmony_ci} 47e41f4b71Sopenharmony_ci``` 48e41f4b71Sopenharmony_ci## cl.arkui.2 Changes to the \<Refresh> Component 49e41f4b71Sopenharmony_ci 50e41f4b71Sopenharmony_ci**Access Level** 51e41f4b71Sopenharmony_ci 52e41f4b71Sopenharmony_ciPublic 53e41f4b71Sopenharmony_ci 54e41f4b71Sopenharmony_ci**Reason for Change** 55e41f4b71Sopenharmony_ci 56e41f4b71Sopenharmony_ciThe UI specifications are changed to bring about UX enhancement. 57e41f4b71Sopenharmony_ci 58e41f4b71Sopenharmony_ci**Change Impact** 59e41f4b71Sopenharmony_ci 60e41f4b71Sopenharmony_ci1. Default refresh settings 61e41f4b71Sopenharmony_ci 62e41f4b71Sopenharmony_ciIn versions earlier than API version 11, child components of the **\<Refresh>** component do not move down with the pull-down gesture, and the edge bounce effect of the component is independent of the loading. 63e41f4b71Sopenharmony_ci 64e41f4b71Sopenharmony_ci 65e41f4b71Sopenharmony_ci 66e41f4b71Sopenharmony_ciSince API version 11, child components of the **\<Refresh>** component move down with the pull-down gesture. 67e41f4b71Sopenharmony_ci 68e41f4b71Sopenharmony_ci 69e41f4b71Sopenharmony_ci 70e41f4b71Sopenharmony_ci2. Custom refresh settings with the builder API 71e41f4b71Sopenharmony_ci 72e41f4b71Sopenharmony_ciIn versions earlier than API version 11, the **\<Refresh>** component is embedded with child components, with a height not greater than 64 vp. The edge bounce effect of the scrolling component and the custom refresh style for the pull-down gesture take effect at the same time. 73e41f4b71Sopenharmony_ci 74e41f4b71Sopenharmony_ci 75e41f4b71Sopenharmony_ci 76e41f4b71Sopenharmony_ciSince API version 11, child components of the **\<Refresh>** component move down with the pull-down gesture. There are no constraints on the height of the custom refresh component with the builder API. 77e41f4b71Sopenharmony_ci 78e41f4b71Sopenharmony_ci 79e41f4b71Sopenharmony_ci 80e41f4b71Sopenharmony_ci3. **friction** API 81e41f4b71Sopenharmony_ci 82e41f4b71Sopenharmony_ciIn versions earlier than API version 11, the **\<Refresh>** component's sensitivity to the pull-down gesture is set through the **friction** API. 83e41f4b71Sopenharmony_ciSince API version 11, the **\<Refresh>** component's sensitivity to the pull-down gesture decreases with the pull-down gesture. The **friction** API has no effect. 84e41f4b71Sopenharmony_ci 85e41f4b71Sopenharmony_ci4. **offset** API 86e41f4b71Sopenharmony_ci 87e41f4b71Sopenharmony_ciIn versions earlier than API version 11, the pull-down distance required for the **\<loadingProgress>** component to start to display is set through the **offset** API of the **\<Refresh>** component. 88e41f4b71Sopenharmony_ciSince API version 11, the pull-down distance required for the **\<loadingProgress>** component to start to display is fixed at 16 vp. The **friction** API has no effect. 89e41f4b71Sopenharmony_ci 90e41f4b71Sopenharmony_ci**API Level** 91e41f4b71Sopenharmony_ci 92e41f4b71Sopenharmony_ci8 93e41f4b71Sopenharmony_ci 94e41f4b71Sopenharmony_ci**Change Since** 95e41f4b71Sopenharmony_ci 96e41f4b71Sopenharmony_ciOpenHarmony SDK 4.1.2.2 97e41f4b71Sopenharmony_ci 98e41f4b71Sopenharmony_ci**Key API/Component Changes** 99e41f4b71Sopenharmony_ci 100e41f4b71Sopenharmony_ciRefresh 101e41f4b71Sopenharmony_ci 102e41f4b71Sopenharmony_ci**Adaptation Guide** 103e41f4b71Sopenharmony_ci 104e41f4b71Sopenharmony_ci1. Default refresh settings 105e41f4b71Sopenharmony_ci 106e41f4b71Sopenharmony_ciFor details, see [Refresh](../../../application-dev/reference/apis-arkui/arkui-ts/ts-container-refresh.md). 107e41f4b71Sopenharmony_ci 108e41f4b71Sopenharmony_ciSample code: 109e41f4b71Sopenharmony_ci 110e41f4b71Sopenharmony_ci```ts 111e41f4b71Sopenharmony_ci@Entry 112e41f4b71Sopenharmony_ci@Component 113e41f4b71Sopenharmony_cistruct RefreshExample { 114e41f4b71Sopenharmony_ci @State isRefreshing: boolean = false 115e41f4b71Sopenharmony_ci @State arr: String[] = ['0', '1', '2', '3', '4','5','6','7','8','9','10'] 116e41f4b71Sopenharmony_ci 117e41f4b71Sopenharmony_ci build() { 118e41f4b71Sopenharmony_ci Column() { 119e41f4b71Sopenharmony_ci Refresh({ refreshing: $$this.isRefreshing}) { 120e41f4b71Sopenharmony_ci List() { 121e41f4b71Sopenharmony_ci ForEach(this.arr, (item: string) => { 122e41f4b71Sopenharmony_ci ListItem() { 123e41f4b71Sopenharmony_ci Text('' + item) 124e41f4b71Sopenharmony_ci .width('100%').height(100).fontSize(16) 125e41f4b71Sopenharmony_ci .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) 126e41f4b71Sopenharmony_ci } 127e41f4b71Sopenharmony_ci }, (item: string) => item) 128e41f4b71Sopenharmony_ci } 129e41f4b71Sopenharmony_ci .onScrollIndex((first: number) => { 130e41f4b71Sopenharmony_ci console.info(first.toString()) 131e41f4b71Sopenharmony_ci }) 132e41f4b71Sopenharmony_ci .width('100%') 133e41f4b71Sopenharmony_ci .height('100%') 134e41f4b71Sopenharmony_ci .divider({strokeWidth:1,color:Color.Yellow,startMargin:10,endMargin:10}) 135e41f4b71Sopenharmony_ci .scrollBar(BarState.Off) 136e41f4b71Sopenharmony_ci .backgroundColor(Color.Yellow) 137e41f4b71Sopenharmony_ci } 138e41f4b71Sopenharmony_ci .onStateChange((refreshStatus: RefreshStatus) => { 139e41f4b71Sopenharmony_ci console.info('Refresh onStatueChange state is ' + refreshStatus) 140e41f4b71Sopenharmony_ci }) 141e41f4b71Sopenharmony_ci .onRefreshing(() => { 142e41f4b71Sopenharmony_ci setTimeout(() => { 143e41f4b71Sopenharmony_ci this.isRefreshing = false 144e41f4b71Sopenharmony_ci }, 2000) 145e41f4b71Sopenharmony_ci console.log('onRefreshing test') 146e41f4b71Sopenharmony_ci }) 147e41f4b71Sopenharmony_ci .backgroundColor(0x89CFF0) 148e41f4b71Sopenharmony_ci } 149e41f4b71Sopenharmony_ci } 150e41f4b71Sopenharmony_ci} 151e41f4b71Sopenharmony_ci``` 152e41f4b71Sopenharmony_ci 153e41f4b71Sopenharmony_ci2. Custom refresh settings with the builder API 154e41f4b71Sopenharmony_ci 155e41f4b71Sopenharmony_ciFor details, see [Refresh](../../../application-dev/reference/apis-arkui/arkui-ts/ts-container-refresh.md). 156e41f4b71Sopenharmony_ci 157e41f4b71Sopenharmony_ciSample code: 158e41f4b71Sopenharmony_ci 159e41f4b71Sopenharmony_ci```ts 160e41f4b71Sopenharmony_ci// xxx.ets 161e41f4b71Sopenharmony_ci@Entry 162e41f4b71Sopenharmony_ci@Component 163e41f4b71Sopenharmony_cistruct RefreshExample { 164e41f4b71Sopenharmony_ci @State isRefreshing: boolean = false 165e41f4b71Sopenharmony_ci @State arr: String[] = ['0', '1', '2', '3', '4','5','6','7','8','9','10'] 166e41f4b71Sopenharmony_ci @Builder 167e41f4b71Sopenharmony_ci customRefreshComponent() 168e41f4b71Sopenharmony_ci { 169e41f4b71Sopenharmony_ci Stack() 170e41f4b71Sopenharmony_ci { 171e41f4b71Sopenharmony_ci Row() 172e41f4b71Sopenharmony_ci { 173e41f4b71Sopenharmony_ci LoadingProgress().height(32) 174e41f4b71Sopenharmony_ci Text("Refreshing...").fontSize(16).margin({left:20}) 175e41f4b71Sopenharmony_ci } 176e41f4b71Sopenharmony_ci .alignItems(VerticalAlign.Center) 177e41f4b71Sopenharmony_ci }.width("100%").align(Alignment.Center) 178e41f4b71Sopenharmony_ci } 179e41f4b71Sopenharmony_ci 180e41f4b71Sopenharmony_ci build() { 181e41f4b71Sopenharmony_ci Column() { 182e41f4b71Sopenharmony_ci Refresh({ refreshing: $$this.isRefreshing,builder:this.customRefreshComponent()}) { 183e41f4b71Sopenharmony_ci List() { 184e41f4b71Sopenharmony_ci ForEach(this.arr, (item: string) => { 185e41f4b71Sopenharmony_ci ListItem() { 186e41f4b71Sopenharmony_ci Text('' + item) 187e41f4b71Sopenharmony_ci .width('100%').height(100).fontSize(16) 188e41f4b71Sopenharmony_ci .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) 189e41f4b71Sopenharmony_ci } 190e41f4b71Sopenharmony_ci }, (item: string) => item) 191e41f4b71Sopenharmony_ci } 192e41f4b71Sopenharmony_ci .onScrollIndex((first: number) => { 193e41f4b71Sopenharmony_ci console.info(first.toString()) 194e41f4b71Sopenharmony_ci }) 195e41f4b71Sopenharmony_ci .width('100%') 196e41f4b71Sopenharmony_ci .height('100%') 197e41f4b71Sopenharmony_ci .divider({strokeWidth:1,color:Color.Yellow,startMargin:10,endMargin:10}) 198e41f4b71Sopenharmony_ci .scrollBar(BarState.Off) 199e41f4b71Sopenharmony_ci .backgroundColor(Color.Yellow) 200e41f4b71Sopenharmony_ci } 201e41f4b71Sopenharmony_ci .onStateChange((refreshStatus: RefreshStatus) => { 202e41f4b71Sopenharmony_ci console.info('Refresh onStatueChange state is ' + refreshStatus) 203e41f4b71Sopenharmony_ci }) 204e41f4b71Sopenharmony_ci .onRefreshing(() => { 205e41f4b71Sopenharmony_ci setTimeout(() => { 206e41f4b71Sopenharmony_ci this.isRefreshing = false 207e41f4b71Sopenharmony_ci }, 2000) 208e41f4b71Sopenharmony_ci console.log('onRefreshing test') 209e41f4b71Sopenharmony_ci }) 210e41f4b71Sopenharmony_ci .backgroundColor(0x89CFF0) 211e41f4b71Sopenharmony_ci } 212e41f4b71Sopenharmony_ci } 213e41f4b71Sopenharmony_ci} 214e41f4b71Sopenharmony_ci``` 215e41f4b71Sopenharmony_ci 216e41f4b71Sopenharmony_ci3. **friction** and **offset** APIs 217e41f4b71Sopenharmony_ci 218e41f4b71Sopenharmony_ciNo adaptation is required. 219