diff --git a/en/application-dev/reference/arkui-ts/Readme-EN.md b/en/application-dev/reference/arkui-ts/Readme-EN.md
index fa391ed8fc8e82744d8f4d5fccf91bbb808db44e..3336ccfb465a74b7a938f16998ee74e3546c6d2d 100644
--- a/en/application-dev/reference/arkui-ts/Readme-EN.md
+++ b/en/application-dev/reference/arkui-ts/Readme-EN.md
@@ -1,4 +1,4 @@
-# TypeScript-based Declarative Development Paradigm
+# eTS-based Declarative Development Paradigm
- Universal Component Information
- Universal Events
@@ -120,12 +120,13 @@
- Canvas Components
- [Canvas](ts-components-canvas-canvas.md)
- [CanvasRenderingContext2D](ts-canvasrenderingcontext2d.md)
- - [OffscreenCanvasRenderingConxt2D](ts-offscreencanvasrenderingcontext2d.md)
- - [Lottie](ts-components-canvas-lottie.md)
- - [Path2D](ts-components-canvas-path2d.md)
- [CanvasGradient](ts-components-canvas-canvasgradient.md)
- [ImageBitmap](ts-components-canvas-imagebitmap.md)
- [ImageData](ts-components-canvas-imagedata.md)
+ - [OffscreenCanvasRenderingContext2D](ts-offscreencanvasrenderingcontext2d.md)
+ - [Path2D](ts-components-canvas-path2d.md)
+ - [Lottie](ts-components-canvas-lottie.md)
+
- Animation
- [AnimatorProperty](ts-animatorproperty.md)
- [Explicit Animation](ts-explicit-animation.md)
@@ -136,8 +137,9 @@
- [Motion Path Animation](ts-motion-path-animation.md)
- [Matrix Transformation](ts-matrix-transformation.md)
- [Interpolation Calculation](ts-interpolation-calculation.md)
+
- Global UI Methods
- - Pop-up Window
+ - Dialog Box
- [Alert Dialog Box](ts-methods-alert-dialog-box.md)
- [Action Sheet](ts-methods-action-sheet.md)
- [Custom Dialog Box](ts-methods-custom-dialog-box.md)
diff --git a/en/application-dev/reference/arkui-ts/figures/NestedScroll.gif b/en/application-dev/reference/arkui-ts/figures/NestedScroll.gif
new file mode 100644
index 0000000000000000000000000000000000000000..4d8b706114c0bca1218f13085c7890d46c96ab28
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/NestedScroll.gif differ
diff --git a/en/application-dev/reference/arkui-ts/figures/defaultFocus.png b/en/application-dev/reference/arkui-ts/figures/defaultFocus.png
new file mode 100644
index 0000000000000000000000000000000000000000..7d0187576fd77ab563034561f5b862bf232ac51d
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/defaultFocus.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_000000111864201.gif b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000111864201.gif
new file mode 100644
index 0000000000000000000000000000000000000000..24702d37d233b9f10a83e4e36b8c8ff23393014f
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000111864201.gif differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001185033226.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001185033226.png
new file mode 100644
index 0000000000000000000000000000000000000000..7a49afcaad7ffb5266b63835f50f42f720665a31
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001185033226.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001193872492.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001193872492.png
new file mode 100644
index 0000000000000000000000000000000000000000..c564bb26b539f1e48acbdb7f2aeeca8df4e4e798
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001193872492.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001193872498.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001193872498.png
new file mode 100644
index 0000000000000000000000000000000000000000..6c136313fe0c8774d1209a398d16ecc4b58c2bcd
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001193872498.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001193872526.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001193872526.png
new file mode 100644
index 0000000000000000000000000000000000000000..3e7218eb57566d86457a9fbd4a8ed0f0dd490c3f
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001193872526.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194032458.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194032458.png
new file mode 100644
index 0000000000000000000000000000000000000000..a07986a04b7477eec14c81d08e442d7b332dab83
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194032458.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194032462.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194032462.png
new file mode 100644
index 0000000000000000000000000000000000000000..3d93b0a0a8f5d0b527d407e450a4a13a1de991ab
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194032462.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194032480.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194032480.png
new file mode 100644
index 0000000000000000000000000000000000000000..5c0a336a56d0e5a186bd235cd25f9f5e5e7e644f
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194032480.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194032666.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194032666.png
new file mode 100644
index 0000000000000000000000000000000000000000..2b9bc96da366d53da784c92620a69f602f7bff14
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194032666.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194192434.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194192434.png
new file mode 100644
index 0000000000000000000000000000000000000000..f5cd637e5bf9db13e3334ca00413e3a91412c813
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194192434.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194192436.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194192436.png
new file mode 100644
index 0000000000000000000000000000000000000000..27556ea43f7c2ecc65b9425e243ea593f02b08ec
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194192436.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194192440.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194192440.png
new file mode 100644
index 0000000000000000000000000000000000000000..2a5c5649cc0716abc024aa3656924a456216a4c2
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194192440.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194352434.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194352434.png
new file mode 100644
index 0000000000000000000000000000000000000000..f1b942fee8437b1197ef3e9f40c98187a76f8c44
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194352434.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194352436.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194352436.png
new file mode 100644
index 0000000000000000000000000000000000000000..00097d258d585ec8ad981703c5b265679e867133
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194352436.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194352442.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194352442.png
new file mode 100644
index 0000000000000000000000000000000000000000..1b1cedac00a77279faa829636bc85028fb5ec711
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001194352442.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001219744193.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001219744193.png
new file mode 100644
index 0000000000000000000000000000000000000000..5855095851b92058f270d69a46546db43ec974b8
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001219744193.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001238712439.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001238712439.png
new file mode 100644
index 0000000000000000000000000000000000000000..f1b942fee8437b1197ef3e9f40c98187a76f8c44
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001238712439.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001238712471.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001238712471.png
new file mode 100644
index 0000000000000000000000000000000000000000..81710c1186a0c0448d70a443db66c09a4e46d395
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001238712471.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001238832389.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001238832389.png
new file mode 100644
index 0000000000000000000000000000000000000000..5c75654b85d596a346fa5d793ca84991fe859a86
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001238832389.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001238832413.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001238832413.png
new file mode 100644
index 0000000000000000000000000000000000000000..defc3c9eb037c06b894ee2e30563facb8c8375ab
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001238832413.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001238952377.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001238952377.png
new file mode 100644
index 0000000000000000000000000000000000000000..abc9a5667500a749dbceee88aef4caebf5d9df18
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001238952377.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001238952387.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001238952387.png
new file mode 100644
index 0000000000000000000000000000000000000000..241fe8546ea2acfdb7baf2c5e66a8af2f0d7b593
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001238952387.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001251092975.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001251092975.png
new file mode 100644
index 0000000000000000000000000000000000000000..05e44b9914ea290f512ed0c2cbc3502b584cd0af
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_0000001251092975.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777771.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777771.png
new file mode 100644
index 0000000000000000000000000000000000000000..06cbacf1470de12c79c2020aa8c6be95506e58b5
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777771.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777772.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777772.png
new file mode 100644
index 0000000000000000000000000000000000000000..9c68b723dd3966886d384028663d4a7d6633c027
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777772.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777773.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777773.png
new file mode 100644
index 0000000000000000000000000000000000000000..7dbcbb2d5710b17866b9d5b034437b91a700a3f9
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777773.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777774.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777774.png
new file mode 100644
index 0000000000000000000000000000000000000000..60f430b646b45a3e3b16a9bb024e4a14e48bf4d3
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777774.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777775.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777775.png
new file mode 100644
index 0000000000000000000000000000000000000000..60f430b646b45a3e3b16a9bb024e4a14e48bf4d3
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777775.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777778.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777778.png
new file mode 100644
index 0000000000000000000000000000000000000000..19e99b9ef490fff79e64e33192c97c1a39c6edf9
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777778.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777779.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777779.png
new file mode 100644
index 0000000000000000000000000000000000000000..4558b332925757d97d70ee57182c260804629346
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777779.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777780.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777780.png
new file mode 100644
index 0000000000000000000000000000000000000000..9b35e8e0fc4bb514584813b79e8889cfe65649a7
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777780.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777781.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777781.png
new file mode 100644
index 0000000000000000000000000000000000000000..9e0a95f73b1aec44e6bccd6750a1c9f2815178ee
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_000000127777781.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_1501929990650.jpg b/en/application-dev/reference/arkui-ts/figures/en-us_image_1501929990650.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..ca0ec86c6c71b6c6daa60bf3ee43795f33568c64
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_1501929990650.jpg differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_background_blur_style.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_background_blur_style.png
new file mode 100644
index 0000000000000000000000000000000000000000..e9a7b0e3baa6d48739c2a3cfbc7b5b46600f9c70
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_background_blur_style.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_visible_area_change.gif b/en/application-dev/reference/arkui-ts/figures/en-us_visible_area_change.gif
new file mode 100644
index 0000000000000000000000000000000000000000..3b82bc987ff6d8bbe42f00e73148b35c445fa8c8
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_visible_area_change.gif differ
diff --git a/en/application-dev/reference/arkui-ts/figures/focus.png b/en/application-dev/reference/arkui-ts/figures/focus.png
new file mode 100644
index 0000000000000000000000000000000000000000..217dcfbca0de33adef4ffa0d90fd167192845c3c
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/focus.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/focusOnTouch.png b/en/application-dev/reference/arkui-ts/figures/focusOnTouch.png
new file mode 100644
index 0000000000000000000000000000000000000000..afc9d772307fd103ac57f11211f0c188e82f46b2
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/focusOnTouch.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/grid-autofill.png b/en/application-dev/reference/arkui-ts/figures/grid-autofill.png
new file mode 100644
index 0000000000000000000000000000000000000000..c45eee033be4548744fd84bbcb5ba29d17868e69
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/grid-autofill.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/gridrow.png b/en/application-dev/reference/arkui-ts/figures/gridrow.png
new file mode 100644
index 0000000000000000000000000000000000000000..ec3c488eed555b83c695c233db992e69c4af639a
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/gridrow.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/groupDefaultFocus1.png b/en/application-dev/reference/arkui-ts/figures/groupDefaultFocus1.png
new file mode 100644
index 0000000000000000000000000000000000000000..12eeaab8f9f0f2b4aa9cb619b0fd07776dc18bd9
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/groupDefaultFocus1.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/groupDefaultFocus2.png b/en/application-dev/reference/arkui-ts/figures/groupDefaultFocus2.png
new file mode 100644
index 0000000000000000000000000000000000000000..f1cc053a757c9020a0f53fcb3a5076eed7df5c8a
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/groupDefaultFocus2.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/groupDefaultFocus3.png b/en/application-dev/reference/arkui-ts/figures/groupDefaultFocus3.png
new file mode 100644
index 0000000000000000000000000000000000000000..115c022b24345fe60008367665feae57ec9fc18f
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/groupDefaultFocus3.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/image-effect.png b/en/application-dev/reference/arkui-ts/figures/image-effect.png
new file mode 100644
index 0000000000000000000000000000000000000000..fc2c9b7d49f7d698aac11d2ede6b0cc58222c7ca
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/image-effect.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/loadingProgress.png b/en/application-dev/reference/arkui-ts/figures/loadingProgress.png
deleted file mode 100644
index afc52b1a469c858e3029282e193b684114803db0..0000000000000000000000000000000000000000
Binary files a/en/application-dev/reference/arkui-ts/figures/loadingProgress.png and /dev/null differ
diff --git a/en/application-dev/reference/arkui-ts/figures/patternlock.gif b/en/application-dev/reference/arkui-ts/figures/patternlock.gif
new file mode 100644
index 0000000000000000000000000000000000000000..5fb034ddcf247a1fecaaeb33e27d103bd8225a91
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/patternlock.gif differ
diff --git a/en/application-dev/reference/arkui-ts/figures/relativecontainer.png b/en/application-dev/reference/arkui-ts/figures/relativecontainer.png
new file mode 100644
index 0000000000000000000000000000000000000000..ebe9c3c7f6ba5ba6756b61f757894cc3f69014bf
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/relativecontainer.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/requestFocus1.png b/en/application-dev/reference/arkui-ts/figures/requestFocus1.png
new file mode 100644
index 0000000000000000000000000000000000000000..0a0d6cedda78aa62c8d8305686cb651940d9ad52
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/requestFocus1.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/requestFocus2.png b/en/application-dev/reference/arkui-ts/figures/requestFocus2.png
new file mode 100644
index 0000000000000000000000000000000000000000..240db2460748f04d64fa7198b749ee95a8a16a48
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/requestFocus2.png differ
diff --git a/en/application-dev/reference/arkui-ts/figures/requestFocus3.png b/en/application-dev/reference/arkui-ts/figures/requestFocus3.png
new file mode 100644
index 0000000000000000000000000000000000000000..7aa241956ef0e9c2edfdbb683f8e3d1306ac7349
Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/requestFocus3.png differ
diff --git a/en/application-dev/reference/arkui-ts/ts-animatorproperty.md b/en/application-dev/reference/arkui-ts/ts-animatorproperty.md
index a5e319adf7338b080bffc01d944805768a5b4f5a..0c147f8a790adf574ba2fa56ee3ede6521727031 100644
--- a/en/application-dev/reference/arkui-ts/ts-animatorproperty.md
+++ b/en/application-dev/reference/arkui-ts/ts-animatorproperty.md
@@ -1,20 +1,27 @@
# Property Animator
-You can create a property animator to animate the universal attributes of a component.
+You can create a property animator to animate certain universal attributes of a component, including **width**, **height**, **backgroundColor**, **opacity**, **scale**, **rotate**, and **translate**.
> **NOTE**
>
> The APIs of this module are supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
+animation(value: {duration?: number, tempo?: number, curve?: string | Curve, delay?:number, iterations: number, playMode?: PlayMode, onFinish?: () => void})
+Applies a property animator to the component to animate its attributes over time.
-| Name | Type | Default Value | Description |
-| ---------- | ---------------------------------------- | --------------- | ----------------------- |
-| duration | number | 1000 | Animation duration, in ms. The default duration is 1000 ms. |
-| curve | [Curve](ts-appendix-enums.md#curve) | Curve.Linear | Animation curve. The default curve is linear. |
-| delay | number | 0 | Delay of animation playback, in ms. By default, the playback is not delayed. |
-| iterations | number | 1 | Number of times that the animation is played. By default, the animation is played once. The value **-1** indicates that the animation is played for an unlimited number of times. |
-| playMode | [PlayMode](ts-appendix-enums.md#playmode) | PlayMode.Normal | Animation playback mode. By default, the animation is played from the beginning after the playback is complete.|
+**Parameters**
+
+
+| Name | Type | Mandatory | Description |
+| ---------- | ------------------------------------------| ---- | ------------------------------------------------------------ |
+| duration | number | No | Animation duration, in ms. Default value: **1000**|
+| tempo | number | No | Animation playback speed. A greater value indicates a higher animation playback speed. The value **0** indicates that no animation is applied. Default value: **1**|
+| curve | string \| [Curve](ts-appendix-enums.md#curve) | No | Animation curve. Default value: **Curve.Linear** |
+| delay | number | No | Delay of animation playback, in ms. The value **0** indicates that the playback is not delayed. Default value: **0** |
+| iterations | number | No | Number of times that the animation is played. The value **-1** indicates that the animation is played for an unlimited number of times. Default value: **1**|
+| playMode | [PlayMode](ts-appendix-enums.md#playmode) | No | Animation playback mode. By default, the animation is played from the beginning after the playback is complete. Default value: **PlayMode.Normal**|
+| onFinish | () => void | No | Callback invoked when the animation playback is complete. |
## Example
diff --git a/en/application-dev/reference/arkui-ts/ts-appendix-enums.md b/en/application-dev/reference/arkui-ts/ts-appendix-enums.md
index 178b4f1763fa27e1bbf0f75d46c3c5029cbfcbe6..72ca6bde7e8b739fd58c057a36c095276bf1542e 100644
--- a/en/application-dev/reference/arkui-ts/ts-appendix-enums.md
+++ b/en/application-dev/reference/arkui-ts/ts-appendix-enums.md
@@ -54,14 +54,14 @@
## MouseButton
-| Name | Description |
-| ------- | ---------------- |
-| Left | Left button on the mouse. |
-| Right | Right button on the mouse. |
-| Middle | Middle button on the mouse. |
-| Back | Back button on the left of the mouse.|
-| Forward | Forward button on the left of the mouse.|
-| None | No button. |
+| Name | Description |
+| ------- | ---------------------------------------- |
+| Left | Left button on the mouse. |
+| Right | Right button on the mouse. |
+| Middle | Middle button on the mouse. |
+| Back | Back button on the left of the mouse. |
+| Forward | Forward button on the left of the mouse. |
+| None | No button. |
## MouseAction
diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-checkboxgroup.md b/en/application-dev/reference/arkui-ts/ts-basic-components-checkboxgroup.md
index 20057bc1c5350b88435782baf7c86c7d576ef652..618dd77ec6f2e7935aa90e4bd2edf17fd9b6eb29 100644
--- a/en/application-dev/reference/arkui-ts/ts-basic-components-checkboxgroup.md
+++ b/en/application-dev/reference/arkui-ts/ts-basic-components-checkboxgroup.md
@@ -1,54 +1,66 @@
# CheckboxGroup
-> **NOTE**
-> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
-
The **\** component is used to select or deselect all check boxes in a group.
-## Required Permissions
-
-None
+> **NOTE**
+>
+> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
## Child Components
-None
+Not supported
## APIs
-CheckboxGroup( group?: string )
+CheckboxGroup(options?: { group?: string })
Creates a check box group so that you can select or deselect all check boxes in the group at the same time. Check boxes and the check box group that share the group name belong to the same group.
-- Parameters
- | Name| Type| Mandatory| Default Value| Description|
- | -------- | -------- | -------- | -------- | -------- |
- | group | string | No| - | Group name.|
+**Parameters**
+| Name| Type| Mandatory| Description|
+| -------- | -------- | -------- | -------- |
+| group | string | No| Group name.|
## Attributes
-| Name| Type| Default Value| Description|
+
+| Name| Type| Default Value | Description|
| -------- | -------- | -------- | -------- |
-| selectAll | bool | false | Whether to select all.|
-| selectedColor | Color | - | Color of the selected check box.|
+| selectAll | boolean | false | Whether to select all. |
+| selectedColor | [ResourceColor](ts-types.md#resourcecolor8) | - | Color of the selected check box.|
## Events
-| Name| Description|
-| -------- | -------- |
-| onChange (callback: (names: Array<string>, status: SelectStatus) => void ) |Triggered when the selection status of the check box group or any check box wherein changes. - **names**: names of all selected check boxes in the group. - **status**: selection status.|
+## onChange
+
+onChange (callback: (event: CheckboxGroupResult ) => void )
-- SelectStatus enums
- | Name | Description|
- | ----- | -------------------- |
- | All | All check boxes in the group are selected.|
- | Part | Some check boxes in the group are selected.|
- | None | None of the check boxes in the group are selected.|
+Triggered when the selection status of the check box group or any check box wherein changes.
+
+| Name | Type | Mandatory | Description |
+| ----- | ------------------- | --------- | ----------------------------------- |
+| event | CheckboxGroupResult | Yes | Callback used to return the result. |
+
+## CheckboxGroupResult
+| Name | Type | Description |
+| ------ | ------ | ------- |
+| name | Array<string> | Names of all the selected check boxes in the group.|
+| status | SelectStatus | Selected status.|
+
+## SelectStatus
+
+| Name | Description|
+| ----- | -------------------- |
+| All | All check boxes in the group are selected.|
+| Part | Some check boxes in the group are selected.|
+| None | None of the check boxes in the group are selected.|
## Example
-```
+```ts
+// xxx.ets
@Entry
@Component
struct CheckboxExample {
diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-gauge.md b/en/application-dev/reference/arkui-ts/ts-basic-components-gauge.md
index a3f94c3873ee27c1df3dabe2b15d769227672003..291b5d3273c6f71649c679b962232780b7b0b68e 100644
--- a/en/application-dev/reference/arkui-ts/ts-basic-components-gauge.md
+++ b/en/application-dev/reference/arkui-ts/ts-basic-components-gauge.md
@@ -1,50 +1,54 @@
# Gauge
+The **\** component is used to display data in a ring chart.
->  **NOTE**
-> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
-
-Data gauge chart widget, which is used to display data in a ring chart.
-
-
-## Required Permissions
-
-None
+> **NOTE**
+>
+> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
## Child Components
-None
+Not supported
## APIs
-Gauge(value:{value: number, min?: number, max?: number})
+Gauge(options:{value: number, min?: number, max?: number})
-- Parameter
- | Name | Type | Mandatory | Default Value | Description |
- | -------- | -------- | -------- | -------- | -------- |
- | value | number | Yes | - | Current data value. |
- | min | number | No | 0 | Minimum value of the current data segment. |
- | max | number | No | 100 | Maximum value of the current data segment. |
+**Parameters**
+| Name| Type| Mandatory| Description|
+| -------- | -------- | -------- | -------- |
+| value | number | Yes| Current data value.|
+| min | number | No| Minimum value of the current data segment. Default value: **0**|
+| max | number | No| Maximum value of the current data segment. Default value: **100**|
## Attributes
-| Name | Type | Default Value | Description |
-| -------- | -------- | -------- | -------- |
-| value | number | 0 | Sets the value of the current data chart. |
-| startAngle | Angle | -150 | Set the start angle. Clock 0 indicates 0 degree, and the clockwise direction indicates the positive angle. |
-| endAngle | Angle | 150 | Sets the end angle position. The clock 0 point is 0 degree, and the clockwise direction is the positive angle. |
-| colors | Color \| Array<ColorStop> | - | Set the color of the chart. You can set the pure color or segmental gradient color. |
-| strokeWidth | Length | - | Sets the ring thickness of a ring chart. |
+| Name| Type| Description|
+| -------- | -------- | -------- |
+| value | number | Value of the chart. Default value: **0**|
+| startAngle | number | Start angle of the chart. The value 0 indicates 0 degrees, and a positive value indicates the clockwise direction. Default value: **-150**|
+| endAngle | number | End angle of the chart. The value 0 indicates 0 degrees, and a positive value indicates the clockwise direction. Default value: **150**|
+| colors | Array<ColorStop> | Colors of the chart. Colors can be set for individual segments.|
+| strokeWidth | [Length](ts-types.md#length) | Stroke width of the chart.|
+
+## ColorStop
+
+Describes a gradient stop.
+
+| Name | Type | Description |
+| --------- | -------------------- | ------------------------------------------------------------ |
+| ColorStop | [[ResourceColor](ts-types.md#resourcecolor8), number] | Type of the gradient stop. The first parameter specifies the color, and the second parameter specifies the offset, which ranges from 0 to 1.|
## Example
-```
+```ts
+// xxx.ets
@Entry
@Component
struct GaugeExample {
diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-image.md b/en/application-dev/reference/arkui-ts/ts-basic-components-image.md
index ad9af15417c6964f9de052985b1f54e88b6f8400..b88b175789c9aa37e06ff27c24072a68ecb4badf 100644
--- a/en/application-dev/reference/arkui-ts/ts-basic-components-image.md
+++ b/en/application-dev/reference/arkui-ts/ts-basic-components-image.md
@@ -1,26 +1,14 @@
# Image
-The **\** component is used to render and display local and online images.
+The **\** component is used to render and display images.
-> **NOTE**
+> **NOTE**
>
-> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
-
+> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
## Required Permissions
-To use online images, you need to add the **ohos.permission.INTERNET** permission to the corresponding abilities in the **config.json** (for the FA model) or **module.json5** file (for the stage model).
-
-```
-"abilities": [
- {
- ...
- "permissions": ["ohos.permission.INTERNET"],
- ...
- }
-]
-```
-
+To use online images, the application must have the **ohos.permission.INTERNET** permission. For details about how to apply for a permission, see [Declaring Permissions](../../security/accesstoken-guidelines.md).
## Child Components
@@ -31,37 +19,38 @@ Not supported
Image(src: string | PixelMap | Resource)
-Obtains an image from the specified source for subsequent rendering and display.
-
**Parameters**
-| Name | Type | Mandatory | Default Value | Description |
-| ---- | ---------------------------------------- | ---- | ---- | ---------------------------------------- |
-| src | string \| [PixelMap](../apis/js-apis-image.md#pixelmap7) \| [Resource](ts-types.md#resource) | Yes | - | Image source. Both local and online images are supported. When using resources referenced using a relative path, for example, `Image("common/test.jpg")`, the **\** component cannot be called across bundles or modules. Therefore, you are advised to use `$r` to reference image resources that need to be used globally. - The following image formats are supported: PNG, JPG, BMP, SVG, GIF. \- Base64 strings are supported. \ The value format is `data:image/[png\|jpeg\|bmp\|webp];base64,[base64 data]`, where `[base64 data]` is a Base64 string. \- The value can also be a path starting with `dataability://`, which is used to access the image path provided by a Data ability.|
+| Name| Type | Mandatory| Default Value| Description |
+| ------ | ------------------------------------------------------------ | ---- | ------ | ------------------------------------------------------------ |
+| src | string\| [PixelMap](../apis/js-apis-image.md#pixelmap7)\| [Resource](ts-types.md#resource) | Yes | - | Image source. Both local and online images are supported. When using resources referenced using a relative path, for example, `Image("common/test.jpg")`, the **\** component cannot be called across bundles or modules. Therefore, you are advised to use `$r` to reference image resources that need to be used globally. - The following image formats are supported: PNG, JPG, BMP, SVG, GIF. \- Base64 strings are supported. The value format is `data:image/[png\|jpeg\|bmp\|webp];base64,[base64 data]`, where `[base64 data]` is a Base64 string. \- The value can also be a path starting with `dataability://`, which is used to access the image path provided by a Data ability. \- Strings with the `file:///data/storage` prefix are supported, which are used to read image resources in the` files` folder in the installation directory of the application. Using such strings requires read permission on the files in the installation directory. |
## Attributes
-
-| Name | Type | Default Value | Description |
-| --------------------- | ------------------------------------------------------- | ------------------------ | ------------------------------------------------------------ |
-| alt | string \| [Resource](ts-types.md#resource) | - | Placeholder image displayed during loading. Both local and Internet URIs are supported. |
-| objectFit | [ImageFit](ts-appendix-enums.md#imagefit) | Cover | Image scale type. |
-| objectRepeat | [ImageRepeat](ts-appendix-enums.md#imagerepeat) | NoRepeat | Whether the image is repeated. **NOTE** This attribute is not applicable to SVG images. |
-| interpolation | ImageInterpolation | None | Interpolation effect of the image. This attribute is intended to alleviate aliasing that occurs when a low-definition image is zoomed in. **NOTE** > This attribute is not applicable to SVG images. > This attribute is not applicable to **PixelMap** objects. |
-| renderMode | ImageRenderMode | Original | Rendering mode of the image. **NOTE** This attribute is not applicable to SVG images. |
-| sourceSize | { width: number, height: number } | - | Decoding size of the image. The original image is decoded into an image of the specified size, in px. **NOTE** This attribute is not applicable to **PixelMap** objects. |
-| matchTextDirection | boolean | false | Whether to display the image in the system language direction. When this parameter is set to true, the image is horizontally flipped in the right-to-left (RTL) language context.|
-| fitOriginalSize | boolean | true | Whether to fit the component to the original size of the image source when the component size is not set.|
-| fillColor | [ResourceColor](ts-types.md#resourcecolor8) | - | Fill color. This parameter is valid only for SVG images. Once set, the fill color will replace that of the SVG image.|
-| autoResize | boolean | true | Whether to resize the image source used for drawing based on the size of the display area during image decoding. This resizing can help reduce the memory usage.|
-| syncLoad8+ | boolean | false | Whether to load images synchronously. By default, images are loaded asynchronously. During synchronous loading, the UI thread is blocked and the placeholder diagram is not displayed. |
+| Name | Type | Default Value | Description |
+| --------------------- | ---------------------------------------- | -------- | ---------------------------------------- |
+| alt | string \| [Resource](ts-types.md#resource) | - | Placeholder image displayed during loading. Only local images are supported. |
+| objectFit | [ImageFit](ts-appendix-enums.md#imagefit) | Cover | Image scale mode. |
+| objectRepeat | [ImageRepeat](ts-appendix-enums.md#imagerepeat) | NoRepeat | Whether the image is repeated. > **NOTE** > This attribute is not applicable to SVG images.|
+| interpolation | ImageInterpolation | None | Interpolation effect of the image. This attribute is intended to alleviate aliasing that occurs when a low-definition image is zoomed in. > **NOTE** > This attribute is not applicable to SVG images or **PixelMap** objects. |
+| renderMode | ImageRenderMode | Original | Rendering mode of the image. > **NOTE** > This attribute is not applicable to SVG images.|
+| sourceSize | { width: number, height: number } | - | Decoding size of the image. The original image is decoded into an image of the specified size. If the value is of the number type, the unit px is used. > **NOTE** > This attribute is not applicable to **PixelMap** objects.|
+| matchTextDirection | boolean | false | Whether to display the image in the system language direction. When this parameter is set to true, the image is horizontally flipped in the right-to-left (RTL) language context. |
+| fitOriginalSize | boolean | true | Whether to fit the component to the original size of the image source when the component size is not set. |
+| fillColor | [ResourceColor](ts-types.md#resourcecolor8) | - | Fill color of the image. This attribute only applies to an SVG image. Once set, the fill color will replace that of the SVG image. |
+| autoResize | boolean | true | Whether to resize the image source used for drawing based on the size of the display area during image decoding. This resizing can help reduce the memory usage.|
+| syncLoad8+ | boolean | false | Whether to load the image synchronously. By default, the image is loaded asynchronously. During synchronous loading, the UI thread is blocked and the placeholder diagram is not displayed. |
+
+> **NOTE**
+>
+> For SVG images, only the following tags are included in the supported list: **svg**, **rect**, **circle**, **ellipse**, **path**, **line**, **polyline**, **polygon**, **animate**, **animateMotion**, and **animateTransform**.
## ImageInterpolation
-| Name | Description |
-| ------ | ------------------------- |
-| None | Interpolation image data is not used. |
-| High | The interpolation image data is used at the high level, which may affect the image rendering speed.|
+| Name | Description |
+| ------ | ------------------------ |
+| None | Interpolation image data is not used. |
+| High | The interpolation image data is used at the high level. The use of the interpolation image data may affect the image rendering speed.|
| Medium | The interpolation image data is used at the medium level. |
| Low | The interpolation image data is used at the low level. |
@@ -74,12 +63,11 @@ Obtains an image from the specified source for subsequent rendering and display.
## Events
-
-| Name | Description |
-| ------------------------------------------------------------ | ------------------------------------------------------------ |
-| onComplete(callback: (event?: { width: number, height: number, componentWidth: number, componentHeight: number, loadingStatus: number }) => void) | Triggered when an image is successfully loaded. The size of the loaded image is returned. - **width**: width of the image, in pixels. - **height**: height of the image, in pixels. - **componentWidth**: width of the container component, in pixels. - **componentHeight**: height of the container component, in pixels. - **loadingStatus**: image loading status. |
-| onError(callback: (event?: { componentWidth: number, componentHeight: number }) => void) | Triggered when an exception occurs during image loading. - **componentWidth**: width of the container component, in pixels. - **componentHeight**: height of the container component, in pixels. |
-| onFinish(event: () => void) | Triggered when the animation playback in the loaded SVG image is complete. If the animation is an infinite loop, this callback is not triggered. |
+| Name | Description |
+| ---------------------------------------- | ---------------------------------------- |
+| onComplete(callback: (event?: { width: number, height: number, componentWidth: number, componentHeight: number, loadingStatus: number }) => void) | Triggered when an image is successfully loaded. The loaded image is returned. |
+| onError(callback: (event?: { componentWidth: number, componentHeight: number }) => void) | Triggered when an exception occurs during image loading. |
+| onFinish(event: () => void) | Triggered when the animation playback in the loaded SVG image is complete. If the animation is an infinite loop, this callback is not triggered.|
## Example
@@ -281,3 +269,53 @@ struct ImageExample3 {
```

+
+### Rendering Sandbox Images
+
+```
+import fileio from '@ohos.fileio';
+import image from '@ohos.multimedia.image';
+
+const EMPTY_PATH = 'file://';
+
+@Entry
+@Component
+struct LoadImageExample {
+ @State fileContent: string = '';
+ @State path: string = EMPTY_PATH;
+ @State accountInfoHeadPic: any = '';
+
+ build() {
+ Column() {
+ Button ('Read Sandbox Image')
+ .margin({ bottom: 10 })
+ .onClick(() => {
+ try {
+ this.path = EMPTY_PATH;
+ let context = getContext(this);
+ let path = context.getApplicationContext().filesDir + '/icon.png';
+ console.log(`Read the sandbox image=========>${path}`);
+ let fd = fileio.openSync(path, 0o100, 0o666);
+ console.log(`create file========>${fd}`);
+ let srcPath = context.bundleCodeDir + '/entry/resource/base/media/icon.png';
+ fileio.copyFileSync(srcPath, path);
+ console.log(`error:=============>${e.message}`);
+ }
+ })
+ Button ('Read Image')
+ .margin({ bottom: 10 })
+ .onClick(() => {
+ this.path = EMPTY_PATH;
+ this.path += getContext(this.bundleCodeDir + '/entry/resource/base/media/icon.png');
+ })
+ Text(`Image path: ${this.path}`)
+ .fontSize(20)
+ .margin({ bottom: 10 })
+ Image(this.path)
+ .width(100)
+ .height(100)
+ }
+ .width('100%').height('100%')
+ }
+}
+```
diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-imageanimator.md b/en/application-dev/reference/arkui-ts/ts-basic-components-imageanimator.md
index 6c80d5cd13ecebefa967428034e6e68bbe00fe2d..424dfa4ce2af05f60aafa7ba28d13a4f8de3b9cb 100644
--- a/en/application-dev/reference/arkui-ts/ts-basic-components-imageanimator.md
+++ b/en/application-dev/reference/arkui-ts/ts-basic-components-imageanimator.md
@@ -1,18 +1,15 @@
# ImageAnimator
-
The **\** component enables images to be played frame by frame. The list of images to be played can be configured, and the duration of each image can be configured.
> **NOTE**
>
> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
-
## Required Permissions
None
-
## Child Components
Not supported
@@ -25,17 +22,16 @@ ImageAnimator()
## Attributes
-| Name| Type| Default Value| Mandatory| Description|
-| -------- | -------- | -------- | -------- | -------- |
-| images | Array<{ src: string, width?: number \| string, height?: number \| string, top?: number \| string, left?: number \| string, duration?: number }> | [] | Yes| Image frame information. The information of each frame includes the image path, image size, image position, and image playback duration. The detailed description is as follows: **src**: image path. The image format can be SVG, PNG, or JPG. **width**: image width. **height**: image height. **top**: vertical coordinate of the image relative to the upper left corner of the component. **left**: horizontal coordinate of the image relative to the upper left corner of the component. **duration**: playback duration of the image, in ms. |
-| state | [AnimationStatus](ts-appendix-enums.md#animationstatus) | Initial | No| Playback status of the animation. The default status is **Initial**.|
-| duration | number | 1000 | No| Playback duration, in ms. The default duration is 1000 ms. When the duration is **0**, no image is played. The value change takes effect only at the beginning of the next cycle. When a separate duration is set in **images**, the setting of this attribute is invalid.|
-| reverse | boolean | false | No| Playback sequence. The value **false** indicates that images are played from the first one to the last one, and **true** indicates that images are played from the last one to the first one.|
-| fixedSize | boolean | true | No| Whether the image size is the same as the component size. **true**: The image size is the same as the component size. In this case, the width, height, top, and left attributes of the image are invalid. **false**: The width, height, top, and left attributes of each image must be set separately.|
-| preDecode | number | 0 | No| Whether to enable pre-decoding. The default value **0** indicates that pre-decoding is disabled. The value **2** indicates that two images following the currently playing frame will be cached in advance to improve performance.|
-| fillMode | [FillMode](ts-appendix-enums.md#fillmode) | Forwards | No| Status before and after the animation starts. For details about the options, see **FillMode**.|
-| iterations | number | 1 | No| Number of times that the animation is played. By default, the animation is played once. The value **-1** indicates that the animation is played for an unlimited number of times.|
-
+| Name | Type | Default Value | Mandatory | Description |
+| ---------- | ----------------------- | -------- | -------- | -------- |
+| images | Array<{ src: string, width?: number \| string, height?: number \| string, top?: number \| string, left?: number \| string, duration?: number }> | [] | No | Image frame information. The information of each frame includes the image path, image size, image position, and image playback duration. The detailed description is as follows: **src**: image path. The image format can be SVG, PNG, or JPG. **width**: image width. **height**: image height. **top**: vertical coordinate of the image relative to the upper left corner of the component. **left**: horizontal coordinate of the image relative to the upper left corner of the component. **duration**: playback duration of the image, in ms. |
+| state | [AnimationStatus](ts-appendix-enums.md#animationstatus) | Initial | No | Playback status of the animation. |
+| duration | number | 1000 | No | Playback duration, in ms. The default duration is 1000 ms. When the duration is **0**, no image is played. The value change takes effect only at the beginning of the next cycle. When a separate duration is set in **images**, the setting of this attribute is invalid. |
+| reverse | boolean | false | No | Playback sequence. The value **false** indicates that images are played from the first one to the last one, and **true** indicates that images are played from the last one to the first one. |
+| fixedSize | boolean | true | No | Whether the image size is the same as the component size. **true**: The image size is the same as the component size. In this case, the width, height, top, and left attributes of the image are invalid. **false**: The width, height, top, and left attributes of each image must be set separately. |
+| preDecode | number | 0 | No | Whether to enable pre-decoding. The default value **0** indicates that pre-decoding is disabled. The value **2** indicates that two images following the currently playing frame will be cached in advance to improve performance. |
+| fillMode | [FillMode](ts-appendix-enums.md#fillmode) | Forwards | No | Status before and after the animation starts. For details about the options, see **FillMode**. |
+| iterations | number | 1 | No | Number of times that the animation is played. By default, the animation is played once. The value **-1** indicates that the animation is played for an unlimited number of times. |
## Events
diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-loadingprogress.md b/en/application-dev/reference/arkui-ts/ts-basic-components-loadingprogress.md
index 9f7c56e96f21ed242fe4764cd8bebab46e80005a..a92a770f5d252e130adfa13ad44ac9f2a4f68434 100644
--- a/en/application-dev/reference/arkui-ts/ts-basic-components-loadingprogress.md
+++ b/en/application-dev/reference/arkui-ts/ts-basic-components-loadingprogress.md
@@ -1,33 +1,32 @@
# LoadingProgress
->  **NOTE**
-> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
-
-The **\** component is used to display the loading progress.
+The **\** component is used to create a loading animation.
-## Required Permissions
+> **NOTE**
+> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
-None
## Child Components
-None
+Not supported
+
## APIs
LoadingProgress()
-Creates a **LoadingProgress** instance.
+Creates a **\** component.
## Attributes
-| Name | Type | Default Value | Description |
-| ----- | ----- | ------------- | ---------------------------------------- |
-| color | Color | - | Foreground color of the loading progress bar. |
+| Name| Type| Description|
+| -------- | -------- | -------- |
+| color | [ResourceColor](ts-types.md#resourcecolor8) | Foreground color of the **\** component.|
## Example
-```
+```ts
+// xxx.ets
@Entry
@Component
struct LoadingProgressExample {
@@ -41,4 +40,4 @@ struct LoadingProgressExample {
}
```
-
\ No newline at end of file
+
diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-marquee.md b/en/application-dev/reference/arkui-ts/ts-basic-components-marquee.md
index dc89934a2760b1c67f84ca216530d0c3a58752e9..3f50f29acd0356a7001470670cfd8666241e349e 100644
--- a/en/application-dev/reference/arkui-ts/ts-basic-components-marquee.md
+++ b/en/application-dev/reference/arkui-ts/ts-basic-components-marquee.md
@@ -1,14 +1,13 @@
# Marquee
+The **\
- **shown**: icon of the control button when the sidebar is shown. - **hidden**: icon of the control button when the sidebar is hidden. - **switching**: icon of the control button when the sidebar is switching between the shown and hidden states.|
+## Attributes
+| Name| Type| Description|
+| -------- | -------- | -------- |
+| showSideBar | boolean | Whether to display the sidebar. Default value: **true**|
+| controlButton | ButtonStyle | Attributes of the sidebar control button.|
+| showControlButton | boolean | Whether to display the sidebar control button. Default value: **true**|
+| sideBarWidth | number | Width of the sidebar. Default value: **200**, in vp|
+| minSideBarWidth | number | Minimum width of the sidebar. Default value: **200**, in vp|
+| maxSideBarWidth | number | Maximum width of the sidebar. Default value: **280**, in vp|
+## ButtonStyle
+| Name| Type| Mandatory| Description|
+| -------- | -------- | -------- | -------- |
+| left | number | No| Spacing between the sidebar control button and the left of the container. Default value: **16**, in vp|
+| top | number | No| Spacing between the sidebar control button and the top of the container. Default value: **48**, in vp|
+| width | number | No| Width of the sidebar control button. Default value: **32**, in vp|
+| height | number | No| Height of the sidebar control button. Default value: **32**, in vp|
+| icons | { shown: string \| PixelMap \| [Resource](ts-types.md#resource) , hidden: string \| PixelMap \| [Resource](ts-types.md#resource) , switching?: string \| PixelMap \| [Resource](ts-types.md#resource) } | No| Icons of the sidebar control button. - **shown**: icon of the control button when the sidebar is shown. - **hidden**: icon of the control button when the sidebar is hidden. - **switching**: icon of the control button when the sidebar is switching between the shown and hidden states.|
## Events
| Name| Description|
| -------- | -------- |
-| onChange(callback: (value: boolen) => void) | Triggered when the status of the sidebar switches between shown and hidden.
The value **true** means that the sidebar is shown, and **false** means that the sidebar is hidden.|
+| onChange(callback: (value: boolean) => void) | Triggered when the status of the sidebar switches between shown and hidden.
The value **true** means that the sidebar is shown, and **false** means the opposite.|
## Example
-```
+```ts
+// xxx.ets
@Entry
@Component
struct SideBarContainerExample {
diff --git a/en/application-dev/reference/arkui-ts/ts-container-stack.md b/en/application-dev/reference/arkui-ts/ts-container-stack.md
index c97e158c1f9d9320903cf5db3e51afbefa0d6602..60974a0a2589fcc9d067157173a9f32128885101 100644
--- a/en/application-dev/reference/arkui-ts/ts-container-stack.md
+++ b/en/application-dev/reference/arkui-ts/ts-container-stack.md
@@ -1,37 +1,32 @@
# Stack
+The **\** component provides a stack container where child components are successively stacked and the latter one overwrites the previous one.
->  **NOTE**
-> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
-
-
-The **<Stack>** component provides a stack container where child components are successively stacked and the latter one overwrites the previous one.
-
-
-## Required Permissions
-
-None
+> **NOTE**
+>
+> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
## Child Components
- Supported
+Supported
## APIs
-Stack(value:{alignContent?: Alignment})
+Stack(value?: { alignContent?: Alignment })
-- Parameters
- | Name | Type | Mandatory | Default Value | Description |
- | -------- | -------- | -------- | -------- | -------- |
- | alignContent | [Alignment](ts-appendix-enums.md#alignment-enums) | No | Center | Alignment of child components in the container. |
+**Parameters**
+| Name| Type| Mandatory| Description|
+| -------- | -------- | -------- | -------- |
+| alignContent | [Alignment](ts-appendix-enums.md#alignment) | No| Alignment of child components in the container. Default value: **Alignment.Center**|
-## Example
+## Example
-```
+```ts
+// xxx.ets
@Entry
@Component
struct StackExample {
diff --git a/en/application-dev/reference/arkui-ts/ts-container-swiper.md b/en/application-dev/reference/arkui-ts/ts-container-swiper.md
index b744026aba94054602fae5d4387aa24da4a6240d..55e2a96c9a894afef18a03a1f7bbaf87582ac46e 100644
--- a/en/application-dev/reference/arkui-ts/ts-container-swiper.md
+++ b/en/application-dev/reference/arkui-ts/ts-container-swiper.md
@@ -1,6 +1,5 @@
# Swiper
-
The **\** component provides a container that allows users to switch among child components using swipe gestures.
> **NOTE**
@@ -8,11 +7,6 @@ The **\** component provides a container that allows users to switch amo
> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
-## Required Permissions
-
-None
-
-
## Child Components
This component can contain child components.
@@ -20,51 +14,51 @@ This component can contain child components.
## APIs
-Swiper(value:{controller?: SwiperController})
+Swiper(value?:{controller?: SwiperController})
**Parameters**
| Name | Type | Mandatory | Description |
| ---------- | ------------------------------------- | ---- | -------------------- |
-| controller | [SwiperController](#swipercontroller) | No | Controller bound to the component to control the page switching. Default value: **null** |
+| controller | [SwiperController](#swipercontroller) | No | Controller bound to the component to control the page switching.|
## Attributes
[Menu control](ts-universal-attributes-menu.md) is not supported.
-| Name | Type | Default Value | Description |
-| --------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
-| index | number | 0 | Index of the child component currently displayed in the container. |
-| autoPlay | boolean | false | Whether to enable automatic playback for child component switching. If this attribute is **true**, the navigation dots indicator does not take effect. |
-| interval | number | 3000 | Interval for automatic playback, in ms. |
-| indicator | boolean | true | Whether to enable the navigation dots indicator. |
-| loop | boolean | true | Whether to enable loop playback. The value **true** means to enable loop playback. When LazyForEach is used, it is recommended that the number of the components to load exceed 5. |
-| duration | number | 400 | Duration of the animation for switching child components, in ms. |
-| vertical | boolean | false | Whether vertical swiping is used. |
-| itemSpace | number \| string | 0 | Space between child components. |
-| displayMode | SwiperDisplayMode | SwiperDisplayMode.Stretch | Mode in which elements are displayed along the main axis. This attribute takes effect only when **displayCount** is not set. |
-| cachedCount8+ | number | 1 | Number of child components to be cached. |
-| disableSwipe8+ | boolean | false | Whether to disable the swipe feature. |
-| displayCount8+ | number \| string | 1 | Number of elements to display. |
-| effectMode8+ | EdgeEffect | EdgeEffect.Spring | Swipe effect. For details, see **EdgeEffect**. |
-| curve8+ | [Curve](ts-appendix-enums.md#curve) \| string | Curve.Ease | Animation curve. The ease-in/ease-out curve is used by default. For details about common curves, see [Curve](ts-appendix-enums.md#curve). You can also create custom curves ([interpolation curve objects](ts-interpolation-calculation.md)) by using the API provided by the interpolation calculation module. |
-| indicatorStyle8+ | { left?: [Length](ts-types.md#length), top?: [Length](ts-types.md#length), right?: [Length](ts-types.md#length), bottom?: [Length](ts-types.md#length), size?: [Length](ts-types.md#length), mask?: boolean, color?: [ResourceColor](ts-types.md#resourcecolor8), selectedColor?: [ResourceColor](ts-types.md#resourcecolor8) } | - | Style of the navigation dots indicator. - **left**: distance between the navigation dots indicator and the left edge of the **\** component. - **top**: distance between the navigation dots indicator and the top edge of the **\** component. - **right**: distance between the navigation dots indicator and the right edge of the **\** component. - **bottom**: distance between the navigation dots indicator and the bottom edge of the **\** component. - **size**: diameter of the navigation dots indicator. - **color**: color of the navigation dots indicator. - **selectedColor**: color of the selected navigation dot.|
+| Name | Type | Description |
+| --------------------------- | ---------------------------------------- | ---------------------------------------- |
+| index | number | Index of the child component currently displayed in the container. Default value: **0** |
+| autoPlay | boolean | Whether to enable automatic playback for child component switching. If this attribute is **true**, the navigation dots indicator does not take effect. Default value: **false** |
+| interval | number | Interval for automatic playback, in ms. Default value: **3000** |
+| indicator | boolean | Whether to enable the navigation dots indicator. Default value: **true** |
+| loop | boolean | Whether to enable loop playback. The value **true** means to enable loop playback. When LazyForEach is used, it is recommended that the number of the components to load exceed 5. Default value: **true**|
+| duration | number | Duration of the animation for switching child components, in ms. Default value: **400** |
+| vertical | boolean | Whether vertical swiping is used. Default value: **false** |
+| itemSpace | number \| string | Space between child components. Default value: **0** |
+| displayMode | SwiperDisplayMode | Mode in which child components are displayed. Default value: **SwiperDisplayMode.Stretch** |
+| cachedCount8+ | number | Number of child components to be cached. Default value: **1** |
+| disableSwipe8+ | boolean | Whether to disable the swipe feature. Default value: **false** |
+| displayCount8+ | number\|string | Number of child components to display per page. The value **auto** is equivalent to **SwiperDisplayMode.AutoLinear**. Default value: **1** |
+| effectMode8+ | [EdgeEffect](ts-appendix-enums.md#edgeeffect) | Swipe effect. Default value: **EdgeEffect.Spring** |
+| curve8+ | [Curve](ts-appendix-enums.md#curve) \| string | Animation curve. The ease-in/ease-out curve is used by default. For details about common curves, see [Curve](ts-appendix-enums.md#curve). You can also create custom curves ([interpolation curve objects](ts-interpolation-calculation.md)) by using the API provided by the interpolation calculation module. Default value: **Curve.Ease**|
+| indicatorStyle8+ | { left?: [Length](ts-types.md#length), top?: [Length](ts-types.md#length), right?: [Length](ts-types.md#length), bottom?: [Length](ts-types.md#length), size?: [Length](ts-types.md#length), mask?: boolean, color?: [ResourceColor](ts-types.md#resourcecolor8), selectedColor?: [ResourceColor](ts-types.md#resourcecolor8) } | Style of the navigation dots indicator. \- **left**: distance between the navigation dots indicator and the left edge of the **\** component. \- **top**: distance between the navigation dots indicator and the top edge of the **\** component. \- **right**: distance between the navigation dots indicator and the right edge of the **\** component. \- **bottom**: distance between the navigation dots indicator and the bottom edge of the **\** component. \- **size**: diameter of the navigation dots indicator. \- **mask**: whether to enable the mask for the navigation dots indicator. \- **color**: color of the navigation dots indicator. \- **selectedColor**: color of the selected navigation dot.|
## SwiperDisplayMode
| Name| Description|
| ----------- | ------------------------------------------ |
| Stretch | The slide width of the **\** component is equal to the width of the component.|
-| AutoLinear | The slide width of the **\** component is equal to the maximum width of the child components.|
+| AutoLinear | The slide width of the **\** component is equal to that of the child component with the maximum width.|
## EdgeEffect
| Name | Description |
| ------ | ------------------------------------------------------------------------- |
-| Spring | Spring effect. When at one of the edges, the component can move beyond the bounds through touches, and produce a bounce effect when the user releases their finger. |
-| Fade | Fade effect. When at one of the edges, the component can move beyond the bounds through touches, and produce a fade effect along the way; when the user releases their finger, the fade changes. |
-| None | No effect. When at one of the edges, the component cannot move beyond the bounds. |
+| Spring | Spring effect. When sliding to one edge, the component can move beyond the bounds through touches, and produce a bounce effect when the user releases their finger. |
+| Fade | Fade effect. When sliding to one edge, the component can move beyond the bounds through touches, and produce a fade effect along the way; when the user releases their finger, the fade changes. |
+| None | No effect. When sliding to one edge, the component cannot move beyond the bounds. |
## SwiperController
@@ -86,7 +80,7 @@ Turns to the previous page.
finishAnimation(callback?: () => void): void
-Stops this animation.
+Stops an animation.
**Parameters**
@@ -98,15 +92,15 @@ Stops this animation.
### onChange
-onChange( index: number) => void
+onChange(event: (index: number) => void)
-Triggered when the index of the currently displayed component changes.
+Triggered when the index of the currently displayed child component changes.
**Parameters**
| Name | Type | Mandatory.| Description|
| --------- | ---------- | ------ | -------- |
-| index | number | Yes | Index of the currently displayed element.|
+| index | number | Yes | Index of the currently displayed child component. |
## Example
diff --git a/en/application-dev/reference/arkui-ts/ts-container-tabcontent.md b/en/application-dev/reference/arkui-ts/ts-container-tabcontent.md
index 09004c1c5c37fc6d1a78ba4854bd1fd63a0578f9..db6b9f80b7b57fda8d475144f44c1a8672d1426f 100644
--- a/en/application-dev/reference/arkui-ts/ts-container-tabcontent.md
+++ b/en/application-dev/reference/arkui-ts/ts-container-tabcontent.md
@@ -1,16 +1,10 @@
# TabContent
+The **\** component is used only in the **\** component. It corresponds to the content view of a switched tab page.
->  **NOTE**
-> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
-
-
-The **<TabContent>** component is used only in the **<Tabs>** component. It corresponds to the content view of a switched tab page.
-
-
-## Required Permissions
-
-None
+> **NOTE**
+>
+> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
## Child Components
@@ -27,20 +21,19 @@ TabContent()
Touch target configuration is not supported.
-| Name | Type | Default Value | Description |
-| -------- | -------- | -------- | -------- |
-| tabBar | string \| { icon?: string, text?: string } \| [CustomBuilder](../../ui/ts-types.md)8+ | - | Content displayed on the tab bar. **CustomBuilder**: builder, to which components can be passed (applicable to API version 8 and later versions). >  **NOTE** > If an icon uses an SVG image, the width and height attributes of the SVG image must be deleted. Otherwise, the icon size will be determined by the width and height attributes of the SVG image. |
+| Name| Type| Description|
+| -------- | -------- | -------- |
+| tabBar | string \| [Resource](ts-types.md#resource) \| { icon?: string \| [Resource](ts-types.md#resource), text?: string \| [Resource](ts-types.md#resource) } \| [CustomBuilder](ts-types.md#custombuilder8)8+ | Content displayed on the tab bar. **CustomBuilder**: builder, to which components can be passed (applicable to API version 8 and later versions). **NOTE** If an icon uses an SVG image, the width and height attributes of the SVG image must be deleted. Otherwise, the icon size will be determined by the width and height attributes of the SVG image. |
->  **NOTE**
-> - The **<TabContent>** component does not support setting of the common width attribute. By default, its width is the same as that of the parent **<Tabs>** component.
->
-> - The **<TabContent>** component does not support setting of the common height attribute. Its height is determined by the height of the parent **<Tabs>** component and the **<TabBar>** component.
+> **NOTE**
+> - The **\** component does not support setting of the common width attribute. By default, its width is the same as that of the parent **\** component.
+> - The **\** component does not support setting of the common height attribute. Its height is determined by the height of the parent **\** component and the **\** component.
## Example
-
-```
+```ts
+// xxx.ets
@Entry
@Component
struct TabContentExample {
diff --git a/en/application-dev/reference/arkui-ts/ts-container-tabs.md b/en/application-dev/reference/arkui-ts/ts-container-tabs.md
index 4f797a9f483942a8b4af751730e9ddbedc85899a..9363abd4602f3aed7151a226519171900f37f4fa 100644
--- a/en/application-dev/reference/arkui-ts/ts-container-tabs.md
+++ b/en/application-dev/reference/arkui-ts/ts-container-tabs.md
@@ -1,70 +1,67 @@
# Tabs
+The **\** component is a container component that allows users to switch between content views through tabs. Each tab page corresponds to a content view.
->  **NOTE**
-> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
-
-
-The **<Tabs>** component is a container component that allows users to switch between content views through tabs. Each tab page corresponds to a content view.
-
-
-## Required Permissions
-
-None
+> **NOTE**
+>
+> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
## Child Components
-The **<Tabs>** component can contain [TabContent](ts-container-tabcontent.md) child components.
+This component can contain multiple [\](ts-container-tabcontent.md) components.
## APIs
-Tabs(value: {barPosition?: BarPosition, index?: number, controller?: [TabsController](#tabscontroller)})
+Tabs(value?: {barPosition?: BarPosition, index?: number, controller?: [TabsController](#tabscontroller)})
+
+**Parameters**
+
+| Name| Type| Mandatory| Description|
+| -------- | -------- | -------- | -------- |
+| barPosition | BarPosition | No| Tab bar position for creating the **\** container component. Default value: **BarPosition.Start**|
+| index | number | No| Initial tab index. Default value: **0**|
+| controller | [TabsController](#tabscontroller) | No| Tab controller.|
-- Parameters
- | Name | Type | Mandatory | Default Value | Description |
- | -------- | -------- | -------- | -------- | -------- |
- | barPosition | BarPosition | No | BarPosition.Start | Tab bar position for creating the **<Tabs>** container component. |
- | index | number | No | 0 | Initial tab index. |
- | controller | [TabsController](#tabscontroller) | No | - | Tab controller. |
+## BarPosition
-- BarPosition enums
- | Name | Description |
- | -------- | -------- |
- | Start | If the **vertical** attribute is set to **true**, the tab is on the left of the container. If the **vertical** attribute is set to **false**, the tab is on the top of the container. |
- | End | If the **vertical** attribute is set to **true**, the tab is on the right of the container. If the **vertical** attribute is set to **false**, the tab is at the bottom of the container. |
+| Name| Description|
+| -------- | -------- |
+| Start | If the **vertical** attribute is set to **true**, the tab is on the left of the container. If the **vertical** attribute is set to **false**, the tab is on the top of the container.|
+| End | If the **vertical** attribute is set to **true**, the tab is on the right of the container. If the **vertical** attribute is set to **false**, the tab is at the bottom of the container.|
## Attributes
Touch target configuration is not supported.
-| Name | Type | Default Value | Description |
-| -------- | -------- | -------- | -------- |
-| vertical | boolean | false | Whether a tab is a vertical tab. |
-| scrollable | boolean | true | Whether page switching can be performed by swiping left or right. |
-| barMode | BarMode | - | Tab bar layout mode. |
-| barWidth | number | - | Width of the tab bar. If this parameter is not set, the default value in the system theme is used. |
-| barHeight | number | - | Height of the tab bar. If this parameter is not set, the default value in the system theme is used. |
-| animationDuration | number | 200 | Animation duration of the tab content. |
+| Name| Type| Description|
+| -------- | -------- | -------- |
+| vertical | boolean | Whether to use vertical tabs. The value **true** means to use vertical tabs, and **false** means to use horizontal tabs. Default value: **false**|
+| scrollable | boolean | Whether the tabs are scrollable. The value **true** means that the tabs are scrollable, and **false** means the opposite. Default value: **true**|
+| barMode | BarMode | Tab bar layout mode. For details, see **BarMode**. Default value: **BarMode.Fixed**|
+| barWidth | [Length](ts-types.md#length) | Width of the tab bar. |
+| barHeight | [Length](ts-types.md#length) | Height of the tab bar. |
+| animationDuration | number | Animation duration of the tab content. Default value: **200**|
-- BarMode enums
- | Name | Description |
- | -------- | -------- |
- | Scrollable | The actual layout width of the tab bar is used. If the actual width exceeds the total length, the tab bar is scrollable. |
- | Fixed | The widths of all tab bars are evenly allocated. |
+## BarMode
+| Name| Description|
+| -------- | -------- |
+| Scrollable | The width of each tab is defined by its label length. The tabs are scrollable when the total width exceeds the tab bar width.|
+| Fixed | The width of each tab is fixed, determined by evenly allocating the tab bar width among the tabs.|
## Events
-| Name | Description |
+| Name| Description|
| -------- | -------- |
-| onChange(callback: (index: number) => void) | Event triggered when a tab is switched. |
+| onChange(event: (index: number) => void) | Event triggered when a tab is switched. - **index**: index of the tab. |
## TabsController
Defines a tab controller, which is used to control switching of tabs.
+
### Objects to Import
```
@@ -78,16 +75,17 @@ changeIndex(value: number): void
Switches to the specified tab.
-- Parameters
- | Name | Type | Mandatory | Default Value | Description |
- | -------- | -------- | -------- | -------- | -------- |
- | value | number | Yes | - | Index of a tab. The value starts from **0**. |
+**Parameters**
+| Name| Type| Mandatory| Description|
+| -------- | -------- | -------- | -------- |
+| value | number | Yes| Index of the tab. The value starts from 0.|
-## Example
+## Example
-```
+```ts
+// xxx.ets
@Entry
@Component
struct TabsExample {
diff --git a/en/application-dev/reference/arkui-ts/ts-drawing-components-circle.md b/en/application-dev/reference/arkui-ts/ts-drawing-components-circle.md
index d462606e550e10892d64e45a31af955f13a6d2e8..f1c4719e5c7ae7601cfed3833d5311766329dce7 100644
--- a/en/application-dev/reference/arkui-ts/ts-drawing-components-circle.md
+++ b/en/application-dev/reference/arkui-ts/ts-drawing-components-circle.md
@@ -1,61 +1,66 @@
# Circle
+ The **\** component is used to draw a circle.
->  **NOTE**
-> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
-
-
-The **<Circle>** component is used to draw a circle.
-
-
-## Required Permissions
-
-None
+> **NOTE**
+>
+> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
## Child Components
-None
+Not supported
## APIs
-Circle(options?: {width: Length, height: Length})
-
-- Parameters
- | Name | Type | Mandatory | Default Value | Description |
- | -------- | -------- | -------- | -------- | -------- |
- | options | Object | No | - | For details, see the **options** parameters. |
-
-- options parameters
- | Name | Type | Mandatory | Default Value | Description |
- | -------- | -------- | -------- | -------- | -------- |
- | width | Length | Yes | - | Width. |
- | height | Length | Yes | - | Height. |
+Circle(options?: {width?: string | number, height?: string | number})
+**Parameters**
+| Name| Type| Mandatory| Default Value| Description|
+| -------- | -------- | -------- | -------- | -------- |
+| width | string \| number | No| 0 | Width of the circle.|
+| height | string \| number | No| 0 | Height of the circle.|
## Attributes
- | Name | Type | Default Value | Mandatory | Description |
+In addition to the [universal attributes](ts-universal-attributes-size.md), the following attributes are supported.
+
+| Name| Type| Default Value| Mandatory| Description|
| -------- | -------- | -------- | -------- | -------- |
-| width | Length | 0 | No | Width of the rectangle where the circle is located. |
-| height | Length | 0 | No | Height of the rectangle where the circle is located. |
+| fill | [ResourceColor](ts-types.md#resourcecolor8) | Color.Black | No| Color of the fill area.|
+| fillOpacity | number \| string \| [Resource](ts-types.md#resource)| 1 | No| Opacity of the fill area.|
+| stroke | [ResourceColor](ts-types.md#resourcecolor8) | Color.Black | No| Stroke color.|
+| strokeDashArray | Array<Length> | [] | No| Stroke dashes.|
+| strokeDashOffset | number \| string | 0 | No| Offset of the start point for drawing the stroke.|
+| strokeLineCap | [LineCapStyle](ts-appendix-enums.md#linecapstyle) | LineCapStyle.Butt | No| Cap style of the stroke.|
+| strokeLineJoin | [LineJoinStyle](ts-appendix-enums.md#linejoinstyle) | LineJoinStyle.Miter | No| Join style of the stroke.|
+| strokeMiterLimit | number \| string | 4 | No| Limit value when the sharp angle is drawn as a miter.|
+| strokeOpacity | number \| string \| [Resource](ts-types.md#resource)| 1 | No| Stroke opacity.|
+| strokeWidth | Length | 1 | No| Stroke width.|
+| antiAlias | boolean | true | No| Whether anti-aliasing is enabled.|
## Example
-
-```
+```ts
+// xxx.ets
@Entry
@Component
struct CircleExample {
build() {
- Flex({ justifyContent: FlexAlign.SpaceAround }) {
+ Column({ space: 10 }) {
// Draw a circle whose diameter is 150.
Circle({ width: 150, height: 150 })
- // Draw a circle whose diameter is 150.
- Circle().width(150).height(150)
- }.width('100%').margin({ top: 5 })
+ // Draw a circle whose diameter is 150 and stroke color is red. (If the width and height values are different, the smaller value will be used as the diameter.)
+ Circle()
+ .width(150)
+ .height(200)
+ .fillOpacity(0)
+ .strokeWidth(3)
+ .stroke(Color.Red)
+ .strokeDashArray([1, 2])
+ }.width('100%')
}
}
```
diff --git a/en/application-dev/reference/arkui-ts/ts-drawing-components-shape.md b/en/application-dev/reference/arkui-ts/ts-drawing-components-shape.md
index 02ba94262e0068bac7f2648c04e1bb40793e9a7c..aaecac495c9f070952c30487f7ac98bb640f868f 100644
--- a/en/application-dev/reference/arkui-ts/ts-drawing-components-shape.md
+++ b/en/application-dev/reference/arkui-ts/ts-drawing-components-shape.md
@@ -5,18 +5,11 @@ The **\** component is the parent component of the drawing components. Th
1. Drawing components use **\** as their parent to implement the effect similar to SVG.
-
2. The **\** component is used independently to draw a specific shape.
-
> **NOTE**
->
-> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
-
-
-## Required Permissions
-
-None
+>
+> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
## Child Components
@@ -28,10 +21,11 @@ This component can contain child components.
Shape(value?: PixelMap)
-- Parameters
- | Name| Type| Mandatory| Default Value| Description|
- | -------- | -------- | -------- | -------- | -------- |
- | value | PixelMap | No| - | Shape to draw. You can draw a shape in the specified **PixelMap** object. If no object is specified, the shape is drawn in the current drawing target.|
+**Parameters**
+
+| Name| Type| Mandatory| Default Value| Description|
+| -------- | -------- | -------- | -------- | -------- |
+| value | PixelMap | No| - | Shape to draw. You can draw a shape in the specified **PixelMap** object. If no object is specified, the shape is drawn in the current drawing target.|
## Attributes
@@ -41,82 +35,201 @@ In addition to the [universal attributes](ts-universal-attributes-size.md), the
| Name| Type| Default Value| Mandatory| Description|
| -------- | -------- | -------- | -------- | -------- |
| viewPort | { x?: number \| string, y?: number \| string, width?: number \| string, height?: number \| string } | { x:0, y:0, width:0, height:0 } | No| View port of the shape.|
-| fill | [ResourceColor](../../ui/ts-types.md) | Color.Black | No| Color of the fill area.|
-| fillOpacity | number \| string \| [Resource](../../ui/ts-types.md#resource-type)| 1 | No| Opacity of the fill area.|
-| stroke | [ResourceColor](../../ui/ts-types.md) | Color.Black | No| Stroke color.|
+| fill | [ResourceColor](ts-types.md#resourcecolor8) | Color.Black | No| Color of the fill area.|
+| fillOpacity | number \| string \| [Resource](ts-types.md#resource)| 1 | No| Opacity of the fill area.|
+| stroke | [ResourceColor](ts-types.md#resourcecolor8) | Color.Black | No| Stroke color.|
| strokeDashArray | Array<Length> | [] | No| Stroke dash.|
| strokeDashOffset | number \| string | 0 | No| Offset of the start point for drawing the stroke.|
| strokeLineCap | [LineCapStyle](ts-appendix-enums.md#linecapstyle) | LineCapStyle.Butt | No| Cap style of the stroke.|
| strokeLineJoin | [LineJoinStyle](ts-appendix-enums.md#linejoinstyle) | LineJoinStyle.Miter | No| Join style of the stroke.|
| strokeMiterLimit | number \| string | 4 | No| Limit value when the sharp angle is drawn as a miter.|
-| strokeOpacity | number \| string \| [Resource](../../ui/ts-types.md#resource-type)| 1 | No| Stroke opacity.|
+| strokeOpacity | number \| string \| [Resource](ts-types.md#resource)| 1 | No| Stroke opacity.|
| strokeWidth | number \| string | 1 | No| Stroke width.|
| antiAlias | boolean | true | No| Whether anti-aliasing is enabled.|
| mesh8+ | Array<number>,number,number | [],0,0 | No| Mesh effect. The first parameter is an array of lengths (column + 1) * (row + 1) * 2, which records the position of each vertex of the distorted bitmap. The second parameter is the number of columns in the mesh matrix. The third parameter is the number of rows in the mesh matrix.|
## Example
+### Example 1
+
```ts
// xxx.ets
@Entry
@Component
struct ShapeExample {
build() {
- Column({ space: 5 }) {
- Text('basic').fontSize(30).fontColor(0xCCCCCC).width(320)
- // Draw a 300 x 50 rectangle with strokes at (-2, -2). The fill color is 0x317Af7, the stroke color is black, the stroke width is 4, the stroke dash is 20, the offset is 10 to the left, the cap style is rounded, the join style is rounded, and anti-aliasing is enabled (default).
- // Draw a 300 x 50 ellipse with strokes at (-2, 58). The fill color is 0x317Af7, the stroke color is black, the stroke width is 4, the stroke dash is 20, the offset is 10 to the left, the cap style is rounded, the join style is rounded, and anti-aliasing is enabled (default).
- // Draw a 300 x 10 path at (-2, 118). The fill color is 0x317Af7, the stroke color is black, the stroke width is 4, the stroke dash is 20, the offset is 10 to the left, the cap style is rounded, the join style is rounded, and anti-aliasing is enabled (default).
+ Column({ space: 10 }) {
+ Text('basic').fontSize(11).fontColor(0xCCCCCC).width(320)
+ // Draw a 300 x 50 rectangle with strokes at (-2, -2). The fill color is 0x317AF7, the stroke color is black, the stroke width is 4, the stroke dash is 20, the offset is 10 to the left, the cap style is rounded, the join style is rounded, and anti-aliasing is enabled (default).
+ // Draw a 300 x 50 ellipse with strokes at (-2, 58). The fill color is 0x317AF7, the stroke color is black, the stroke width is 4, the stroke dash is 20, the offset is 10 to the left, the cap style is rounded, the join style is rounded, and anti-aliasing is enabled (default).
+ // Draw a 300 x 10 straight line at (-2, 118). The fill color is 0x317AF7, the stroke color is black, the stroke width is 4, the stroke dash is 20, the offset is 10 to the left, the cap style is rounded, the join style is rounded, and anti-aliasing is enabled (default).
Shape() {
Rect().width(300).height(50)
Ellipse().width(300).height(50).offset({ x: 0, y: 60 })
Path().width(300).height(10).commands('M0 0 L900 0').offset({ x: 0, y: 120 })
}
.viewPort({ x: -2, y: -2, width: 304, height: 130 })
- .fill(0x317Af7).stroke(Color.Black).strokeWidth(4)
- .strokeDashArray([20]).strokeDashOffset(10).strokeLineCap(LineCapStyle.Round)
- .strokeLineJoin(LineJoinStyle.Round).antiAlias(true)
- // Draw a 300 x 50 rectangle with strokes at (-1, -1). The fill color is 0x317Af7, the stroke color is black, and the stroke width is 2.
+ .fill(0x317AF7)
+ .stroke(Color.Black)
+ .strokeWidth(4)
+ .strokeDashArray([20])
+ .strokeDashOffset(10)
+ .strokeLineCap(LineCapStyle.Round)
+ .strokeLineJoin(LineJoinStyle.Round)
+ .antiAlias(true)
+ // Draw a 300 x 50 rectangle with strokes at (0, 0) and (-5, -5). The drawing start point is the midpoint of the stroke width by default. To fully display the strokes, you must set the coordinates of the start position of the viewport to negative values so that the viewport is offset by half the stroke width.
Shape() {
Rect().width(300).height(50)
- }.viewPort({ x: -1, y: -1, width: 302, height: 52 }).fill(0x317Af7).stroke(Color.Black).strokeWidth(2)
+ }
+ .viewPort({ x: 0, y: 0, width: 320, height: 70 })
+ .fill(0x317AF7)
+ .stroke(Color.Black)
+ .strokeWidth(10)
- Text('border').fontSize(30).fontColor(0xCCCCCC).width(320).margin({top:30})
- // Draw a 300 x 10 path at (0, -5). The color is 0xEE8443, the stroke width is 10, and the stroke gap is 20.
Shape() {
- Path().width(300).height(10).commands('M0 0 L900 0')
- }.viewPort({ x: 0, y: -5, width: 300, height: 20 }).stroke(0xEE8443).strokeWidth(10).strokeDashArray([20])
- // Draw a 300 x 10 path at (0, -5). The fill color is 0xEE8443, the stroke width is 10, the stroke dash is 20, and the offset is 10 to the left.
+ Rect().width(300).height(50)
+ }
+ .viewPort({ x: -5, y: -5, width: 320, height: 70 })
+ .fill(0x317AF7)
+ .stroke(Color.Black)
+ .strokeWidth(10)
+
+ Text('path').fontSize(11).fontColor(0xCCCCCC).width(320)
+ // Draw a straight line at (0, -5). The fill color is 0xEE8443, the stroke width is 10, and the stroke dash is 20.
Shape() {
Path().width(300).height(10).commands('M0 0 L900 0')
}
.viewPort({ x: 0, y: -5, width: 300, height: 20 })
- .stroke(0xEE8443).strokeWidth(10).strokeDashArray([20]).strokeDashOffset(10)
- // Draw a 300 x 10 path at (0, -5). The fill color is 0xEE8443, the stroke width is 10, and the stroke opacity is 0.5.
+ .stroke(0xEE8443)
+ .strokeWidth(10)
+ .strokeDashArray([20])
+ // Draw a straight line at (0, -5). The fill color is 0xEE8443, the stroke width is 10, the stroke dash is 20, and the offset is 10 to the left.
Shape() {
Path().width(300).height(10).commands('M0 0 L900 0')
- }.viewPort({ x: 0, y: -5, width: 300, height: 20 }).stroke(0xEE8443).strokeWidth(10).strokeOpacity(0.5)
- // Draw a 300 x 10 path at (0, -5). The fill color is 0xEE8443, the stroke width is 10, the stroke dash is 20, the offset is 10 to the left, and the cap style is rounded.
+ }
+ .viewPort({ x: 0, y: -5, width: 300, height: 20 })
+ .stroke(0xEE8443)
+ .strokeWidth(10)
+ .strokeDashArray([20])
+ .strokeDashOffset(10)
+ // Draw a straight line at (0, -5). The fill color is 0xEE8443, the stroke width is 10, and the stroke opacity is 0.5.
Shape() {
Path().width(300).height(10).commands('M0 0 L900 0')
}
.viewPort({ x: 0, y: -5, width: 300, height: 20 })
- .stroke(0xEE8443).strokeWidth(10).strokeDashArray([20]).strokeLineCap(LineCapStyle.Round)
- // Draw a 300 x 50 rectangle with strokes at (-5, -5). The fill color is 0x317Af7, the stroke width is 10, the stroke color is 0xEE8443, and the join style is rounded.
+ .stroke(0xEE8443)
+ .strokeWidth(10)
+ .strokeOpacity(0.5)
+ // Draw a straight line at (0, -5). The fill color is 0xEE8443, the stroke width is 10, the stroke dash is 20, and the cap style is rounded.
Shape() {
- Rect().width(300).height(100)
+ Path().width(300).height(10).commands('M0 0 L900 0')
}
- .viewPort({ x: -5, y: -5, width: 310, height: 120 })
- .fill(0x317Af7).stroke(0xEE8443).strokeWidth(10).strokeLineJoin(LineJoinStyle.Round)
+ .viewPort({ x: 0, y: -5, width: 300, height: 20 })
+ .stroke(0xEE8443)
+ .strokeWidth(10)
+ .strokeDashArray([20])
+ .strokeLineCap(LineCapStyle.Round)
+ // Draw a closed path at (-80, -5). The fill color is 0x317AF7, the stroke width is 10, the stroke color is 0xEE8443, and the join style is miter (default value).
Shape() {
- Path().width(300).height(60).commands('M0 0 L400 0 L400 200 Z')
+ Path().width(200).height(60).commands('M0 0 L400 0 L400 150 Z')
}
- .viewPort({ x: -80, y: -5, width: 310, height: 100 })
- .fill(0x317Af7).stroke(0xEE8443).strokeWidth(10)
- .strokeLineJoin(LineJoinStyle.Miter).strokeMiterLimit(5)
+ .viewPort({ x: -80, y: -5, width: 310, height: 90 })
+ .fill(0x317AF7)
+ .stroke(0xEE8443)
+ .strokeWidth(10)
+ .strokeLineJoin(LineJoinStyle.Miter)
+ .strokeMiterLimit(5)
}.width('100%').margin({ top: 15 })
}
}
```

+
+### Example 2
+
+```ts
+// xxx.ets
+@Entry
+@Component
+struct ShapeMeshExample {
+ @State columnVal: number = 0;
+ @State rowVal: number = 0;
+ @State count: number = 0;
+ @State verts: Array = [];
+ @State shapeWidth: number = 600;
+ @State shapeHeight: number = 600;
+
+ build() {
+ Column() {
+ Shape() {
+ Rect()
+ .width('250px')
+ .height('250px')
+ .radiusWidth('10px')
+ .radiusHeight('10px')
+ .stroke('10px')
+ .margin({ left: '10px', top: '10px' })
+ .strokeWidth('10px')
+ .fill(Color.Blue)
+ Rect()
+ .width('250px')
+ .height('250px')
+ .radiusWidth('10px')
+ .radiusHeight('10px')
+ .stroke('10px')
+ .margin({ left: '270px', top: '10px' })
+ .strokeWidth('10px')
+ .fill(Color.Red)
+ }
+ .mesh(this.verts, this.columnVal, this.rowVal)
+ .width(this.shapeWidth + 'px')
+ .height(this.shapeHeight + 'px')
+ // The mesh distortion effect is displayed when the component is touched.
+ .onTouch((event: TouchEvent) => {
+ var touchX = event.touches[0].x * 2;
+ var touchY = event.touches[0].y * 2;
+ this.columnVal = 20;
+ this.rowVal = 20;
+ this.count = (this.columnVal + 1) * (this.rowVal + 1);
+ var orig = [this.count * 2];
+ var index = 0;
+ for (var i = 0; i <= this.rowVal; i++) {
+ var fy = this.shapeWidth * i / this.rowVal;
+ for (var j = 0; j <= this.columnVal; j++) {
+ var fx = this.shapeWidth * j / this.columnVal;
+ orig[index * 2 + 0] = this.verts[index * 2 + 0] = fx;
+ orig[index * 2 + 1] = this.verts[index * 2 + 1] = fy;
+ index++;
+ }
+ }
+ for (var k = 0; k < this.count * 2; k += 2) {
+ var dx = touchX - orig[k + 0];
+ var dy = touchY - orig[k + 1];
+ var dd = dx * dx + dy * dy;
+ var d = Math.sqrt(dd);
+ var pull = 80000 / (dd * d);
+ if (pull >= 1) {
+ this.verts[k + 0] = touchX;
+ this.verts[k + 1] = touchY;
+ } else {
+ this.verts[k + 0] = orig[k + 0] + dx * pull;
+ this.verts[k + 1] = orig[k + 1] + dy * pull;
+ }
+ }
+ })
+ }
+ .width('600px')
+ .height('600px')
+ .border({ width: 3, color: Color.Black })
+ }
+}
+```
+
+Diagram:
+
+
+
+The mesh distortion effect is displayed when the component is touched, as shown below.
+
+
diff --git a/en/application-dev/reference/arkui-ts/ts-explicit-animation.md b/en/application-dev/reference/arkui-ts/ts-explicit-animation.md
index b38389f2ee64721e72242882f9746cb7b0545eba..9ab2460b28743c2bacedca43c081c01cdc2e4472 100644
--- a/en/application-dev/reference/arkui-ts/ts-explicit-animation.md
+++ b/en/application-dev/reference/arkui-ts/ts-explicit-animation.md
@@ -7,29 +7,24 @@ You can create explicit animation with your custom settings.
> The APIs of this module are supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
-| API | Description |
+| API | Description |
| ------------------------------------------------------------ | ------------------------------------------------------------ |
-| animateTo(value: [AnimationOptions](#animationoptions), event: ()=> void) : void | Provides a transition animation when the status changes due to the closure code. **event** specifies the closure function that displays the dynamic effect. The system automatically inserts the transition animation if the status changes in the closure function.|
+| animateTo(value: [AnimationOptions](#animationoptions), event: ()=> void) : void | Provides a transition animation when the status changes due to the closure code. **event** specifies the closure function that displays the dynamic effect. The system automatically inserts the transition animation if the status changes in the closure function. |
## AnimationOptions
-- Attributes
- | Name| Type| Default Value| Description|
- | -------- | -------- | -------- | -------- |
- | duration | number | 1000 | Animation duration, in ms.|
- | tempo | number | 1.0 | Animation playback speed. A larger value indicates faster animation playback, and a smaller value indicates slower animation playback. The value **0** means that there is no animation.|
- | curve | Curve \| Curves | Linear | Animation curve.|
- | delay | number | 0 | Delay of animation playback, in ms. By default, the playback is not delayed.|
- | iterations | number | 1 | Number of times that the animation is played. By default, the animation is played once. The value **-1** indicates that the animation is played for an unlimited number of times.|
- | playMode | [PlayMode](ts-appendix-enums.md#playmode) | Normal | Animation playback mode. By default, the animation is played from the beginning after the playback is complete.|
+| Name| Type| Description|
+| -------- | -------- | -------- |
+| duration | number | Animation duration, in ms. Default value: **1000**|
+| tempo | number | Animation playback speed. A larger value indicates faster animation playback, and a smaller value indicates slower animation playback. The value **0** means that there is no animation. Default value: **1.0**|
+| curve | Curve \| Curves | Animation curve. Default value: **Curve.Linear**|
+| delay | number | Delay of animation playback, in ms. By default, the playback is not delayed. Default value: **0**|
+| iterations | number | Number of times that the animation is played. By default, the animation is played once. The value **-1** indicates that the animation is played for an unlimited number of times. Default value: **1**|
+| playMode | [PlayMode](ts-appendix-enums.md#playmode) | Animation playback mode. By default, the animation is played from the beginning after the playback is complete. Default value: **PlayMode.Normal**|
+| onFinish | () => void | Callback invoked when the animation playback is complete.|
-- APIs
- | Name| Description|
- | -------- | -------- |
- | onFinish() => void | Callback invoked when the animation playback is complete.|
-
## Example
@@ -68,7 +63,7 @@ struct AnimateToExample {
} else {
animateTo({
duration: 200, // Animation duration
- curve: Curve.Ease, // Animation curve
+ curve: Curve.Ease, // Animated curve
delay: 200, // Animation delay
iterations: 1, // Number of playback times
playMode: PlayMode.Normal // Animation playback mode
diff --git a/en/application-dev/reference/arkui-ts/ts-gesture-settings.md b/en/application-dev/reference/arkui-ts/ts-gesture-settings.md
index 8c2d676ceccbb0bc989343db94aadc0d0fff1e78..0dda852d95adc76dfab2f49c8ee475c8e21b1d26 100644
--- a/en/application-dev/reference/arkui-ts/ts-gesture-settings.md
+++ b/en/application-dev/reference/arkui-ts/ts-gesture-settings.md
@@ -1,13 +1,10 @@
-# Gesture Binding Methods
+# Gesture Binding
+Bind different types of gesture events to components and set response methods for them.
-> **NOTE**
-> This method is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
-
-
-## Required Permissions
-
-None
+> **NOTE**
+>
+> The APIs of this module are supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
## Binding Gesture Recognition
@@ -16,80 +13,128 @@ None
Use the following attributes to bind gesture recognition to a component. When a gesture is recognized, the event callback is invoked to notify the component.
-| Name | Type | Default Value | Description |
+| Name | Type| Default Value| Description|
| -------- | -------- | -------- | -------- |
-| gesture | gesture: GestureType, mask?: GestureMask | gesture: -, mask: GestureMask.Normal | Gesture to recognize. - **gesture**: type of the gesture to bind. - **mask**: event response setting. |
-| priorityGesture | gesture: GestureType, mask?: GestureMask | gesture: -, mask: GestureMask.Normal | Gesture to preferentially recognize. - **gesture**: type of the gesture to bind. - **mask**: event response setting. By default, the child component takes precedence over the parent component in gesture recognition. When **priorityGesture** is configured for the parent component, the parent component takes precedence over the child component in gesture recognition. |
-| parallelGesture | gesture: GestureType, mask?: GestureMask | gesture: -, mask: GestureMask.Normal | Gesture that can be triggered together with the child component gesture. - **gesture**: type of the gesture to bind. - **mask**: event response setting. The gesture event is not a bubbling event. When **parallelGesture** is set for the parent component, gesture events bound to both the parent and child components can be triggered, thereby implementing a bubbling effect. |
+| gesture | gesture: GestureType, mask?: GestureMask | gesture: -, mask: GestureMask.Normal | Gesture to recognize. - **gesture**: type of the gesture to bind. - **mask**: event response setting.|
+| priorityGesture | gesture: GestureType, mask?: GestureMask | gesture: -, mask: GestureMask.Normal | Gesture to preferentially recognize. - **gesture**: type of the gesture to bind. - **mask**: event response setting. By default, the child component takes precedence over the parent component in gesture recognition. When **priorityGesture** is configured for the parent component, the parent component takes precedence over the child component in gesture recognition.|
+| parallelGesture | gesture: GestureType, mask?: GestureMask | gesture: -, mask: GestureMask.Normal | Gesture that can be triggered together with the child component gesture. - **gesture**: type of the gesture to bind. - **mask**: event response setting. The gesture event is not a bubbling event. When **parallelGesture** is set for the parent component, gesture events that are the same for the parent component and child components can be triggered, thereby implementing a bubbling effect.|
-- GestureMask enums
- | Name | Description |
+- GestureMask
+ | Name| Description|
| -------- | -------- |
- | Normal | The gestures of child components are not masked and are recognized based on the default gesture recognition sequence. |
- | IgnoreInternal | The gestures of child components are masked. Only the gestures of the current component are recognized. However, the built-in gestures of the child components are not masked. For example, when the child component is a **<List>** component, the built-in sliding gestures can still be triggered. |
+ | Normal | The gestures of child components are not masked and are recognized based on the default gesture recognition sequence.|
+ | IgnoreInternal | The gestures of child components are masked. Only the gestures of the current component are recognized. However, the built-in gestures of the child components are not masked. For example, when the child component is a **** component, the built-in sliding gestures can still be triggered.|
-- GestureType enums
- | Name | Description |
+- GestureType
+ | Name| Description|
| -------- | -------- |
- | TapGesture | Tap gesture, which can be a single-tap or multi-tap gesture. |
- | LongPressGesture | Long press gesture. |
- | PanGesture | Pan gesture. |
- | PinchGesture | Pinch gesture. |
- | RotationGesture | Rotation gesture. |
- | SwipeGesture | Swipe gesture, which can be idenfied when the swipe speed is 100 vp/s or higher. |
- | GestureGroup | A group of gestures. Continuous recognition, parallel recognition, and exclusive recognition are supported. |
+ | TapGesture | Tap gesture, which can be a single-tap or multi-tap gesture.|
+ | LongPressGesture | Long press gesture.|
+ | PanGesture | Pan gesture, which requires a minimum 5 vp movement distance of a finger on the screen.|
+ | PinchGesture | Pinch gesture.|
+ | RotationGesture | Rotation gesture.|
+ | SwipeGesture | Swipe gesture, which can be recognized when the swipe speed is 100 vp/s or higher.|
+ | GestureGroup | A group of gestures. Continuous recognition, parallel recognition, and exclusive recognition are supported.|
## Gesture Response Event
-A component uses the **gesture** method to bind the gesture object and uses the events provided in this object to respond to the gesture operation. For example, the **onAction** event of the **TapGesture** object can be used to respond to a click event. For details about the event definition, see the section of each gesture object.
+The component uses the **gesture** method to bind the gesture object and uses the events provided in this object to respond to the gesture operation. For example, the **onAction** event of the **TapGesture** object can be used to respond to a click event. For details about the event definitions of other gestures, see the corresponding gesture sections.
-- TapGesture events
- | Name | Description |
+- TapGesture
+ | Name| Description|
| -------- | -------- |
- | onAction((event?: GestureEvent) => void) | Callback invoked when a tap gesture is recognized. |
+ | onAction((event?:GestureEvent) => void) | Callback invoked when a tap gesture is recognized.|
- GestureEvent attributes
- | Name | Type | Description |
+ | Name| Type| Description|
+ | -------- | -------- | -------- |
+ | timestamp8+ | number | Timestamp of the event. It is interval between the time when the event is triggered and the time when the system starts, in nanoseconds.|
+ | target8+ | [EventTarget](ts-universal-events-click.md) | Display area of the element that triggers the gesture event.|
+ | source8+ | SourceType | Event input device.|
+ | repeat | boolean | Whether the event is triggered repeatedly. This parameter is used for the **LongPressGesture** event.|
+ | fingerList8+ | FingerInfo[] | Information about all fingers that trigger the event, which is used for the **LongPressGesture** and **TapGesture** events.|
+ | offsetX | number | Offset of the gesture event on the x-axis, in vp. This parameter is used for the **PanGesture** event.|
+ | offsetY | number | Offset of the gesture event on the y-axis, in vp. This parameter is used for the **PanGesture** event.|
+ | angle | number | Rotation angle for the **RotationGesture** event; angle of the swipe gesture for the **SwipeGesture** event, that is, the change in the included angle between the line segment created by the two fingers and the horizontal direction. **NOTE** Angle calculation method: After a swipe gesture is recognized, a line connecting the two fingers is identified as the initial line. As the fingers swipe, the line between the fingers rotates. Based on the coordinates of the initial line's and current line's end points, an arc tangent function is used to calculate the respective included angle of the points relative to the horizontal direction by using the following formula: Rotation angle = arctan2(cy2-cy1,cx2-cx1) - arctan2(y2-y1,x2-x1) The initial line is used as the coordinate system. The clockwise rotation is 0 to 180 degrees, and the counter-clockwise rotation is –180 to 0 degrees. |
+ | speed8+ | number | Swipe gesture speed, that is, the average swipe speed of all fingers. The unit is vp/s. This attribute is used for the **SwipeGesture** event.|
+ | scale | number | Scale ratio. This attribute is used for the **PinchGesture** event.|
+ | pinchCenterX | number | X-coordinate of the center of the pinch gesture, in px. This attribute is used for the **PinchGesture** event.|
+ | pinchCenterY | number | Y-coordinate of the center of the pinch gesture, in px. This attribute is used for the **PinchGesture** event.|
+
+- SourceType
+ | Name| Description|
+ | -------- | -------- |
+ | Unknown | Unknown device type.|
+ | Mouse | Mouse.|
+ | TouchScreen | Touchscreen.|
+
+- FingerInfo
+ | Name| Type| Description|
| -------- | -------- | -------- |
- | timestamp | number | Timestamp of the event. |
- | target8+ | [EventTarget](ts-universal-events-click.md) | Object that triggers the gesture event. |
+ | id | number | Index of a finger.|
+ | globalX | number | X-coordinate relative to the upper left corner of the application window.|
+ | globalY | number | Y-coordinate relative to the upper left corner of the application window.|
+ | localX | number | X-coordinate relative to the upper left corner of the current component.|
+ | localY | number | Y-coordinate relative to the upper left corner of the current component.|
## Example
-
```ts
// xxx.ets
@Entry
@Component
struct GestureSettingsExample {
- @State value: string = ''
+ @State priorityTestValue: string = '';
+ @State parallelTestValue: string = '';
build() {
- Column(){
+ Column() {
Column() {
- Text('Click\n' + this.value)
+ Text('TapGesture:' + this.priorityTestValue).fontSize(28)
.gesture(
TapGesture()
.onAction(() => {
- this.value = 'gesture onAction'
+ this.priorityTestValue += '\nText';
}))
- }.height(200).width(300).padding(60).border({ width: 1 })
- // When priorityGesture is specified, the bound gesture is preferentially recognized and the child component gesture is ignored.
+ }
+ .height(200)
+ .width(250)
+ .padding(20)
+ .margin(20)
+ .border({ width: 3 })
+ // When priorityGesture is set, the tap gesture on the component is prioritized over the tap gesture on the child component.
.priorityGesture(
TapGesture()
.onAction((event: GestureEvent) => {
- this.value = 'priorityGesture onAction' + '\ncomponent globalPos:('
- + event.target.area.globalPosition.x + ',' + event.target.area.globalPosition.y + ')\nwidth:'
- + event.target.area.width + '\nheight:' + event.target.area.height
- }), GestureMask.IgnoreInternal
- )
- }.padding(60)
+ this.priorityTestValue += '\nColumn';
+ }), GestureMask.IgnoreInternal)
+
+ Column() {
+ Text('TapGesture:' + this.parallelTestValue).fontSize(28)
+ .gesture(
+ TapGesture()
+ .onAction(() => {
+ this.parallelTestValue += '\nText';
+ }))
+ }
+ .height(200)
+ .width(250)
+ .padding(20)
+ .margin(20)
+ .border({ width: 3 })
+ // When parallelGesture is set, the tap gestures on the component and on the child component are both recognized.
+ .parallelGesture(
+ TapGesture()
+ .onAction((event: GestureEvent) => {
+ this.parallelTestValue += '\nColumn';
+ }), GestureMask.Normal)
+ }
}
}
```
-
\ No newline at end of file
+
diff --git a/en/application-dev/reference/arkui-ts/ts-interpolation-calculation.md b/en/application-dev/reference/arkui-ts/ts-interpolation-calculation.md
index 60a948e43c72f62c1a28af17ecabeda82a291d36..6c76547081a1e8a78cad7e1fe14031be5536c8d9 100644
--- a/en/application-dev/reference/arkui-ts/ts-interpolation-calculation.md
+++ b/en/application-dev/reference/arkui-ts/ts-interpolation-calculation.md
@@ -1,7 +1,8 @@
# Interpolation Calculation
-> **NOTE**
+> **NOTE**
+>
> This animation is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
diff --git a/en/application-dev/reference/arkui-ts/ts-media-components-video.md b/en/application-dev/reference/arkui-ts/ts-media-components-video.md
index feb0be7fbc61f43b4c1c1b347c6cf75c330bfa91..a1b70cba60d30f5f5802598a8af9473cf4c4b904 100644
--- a/en/application-dev/reference/arkui-ts/ts-media-components-video.md
+++ b/en/application-dev/reference/arkui-ts/ts-media-components-video.md
@@ -1,84 +1,76 @@
# Video
-The **\