From 4f7ad02d4f8943cc54f9536d8cb547231996c645 Mon Sep 17 00:00:00 2001 From: wangxinbo Date: Thu, 15 May 2025 19:44:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20AbilityKit=20FAQ=E6=A0=87=E8=AE=B0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entry/src/main/ets/pages/PullUpBrowserApplication.ets | 4 ++-- AbilityKit/entry/src/main/ets/pages/PullUpCamera.ets | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/AbilityKit/entry/src/main/ets/pages/PullUpBrowserApplication.ets b/AbilityKit/entry/src/main/ets/pages/PullUpBrowserApplication.ets index c6b010fd..b8ec51ac 100644 --- a/AbilityKit/entry/src/main/ets/pages/PullUpBrowserApplication.ets +++ b/AbilityKit/entry/src/main/ets/pages/PullUpBrowserApplication.ets @@ -17,7 +17,7 @@ * FAQ:如何拉起浏览器应用 */ -// DocsCode 1 +// [Start start_browsable_ability] import { common, Want } from '@kit.AbilityKit'; import { BusinessError } from '@kit.BasicServicesKit'; @@ -60,4 +60,4 @@ struct BrowsableAbilityView { .height('100%') } } -// DocsCode 1 \ No newline at end of file +// [End start_browsable_ability] \ No newline at end of file diff --git a/AbilityKit/entry/src/main/ets/pages/PullUpCamera.ets b/AbilityKit/entry/src/main/ets/pages/PullUpCamera.ets index 3d66c2db..32fdb3b2 100644 --- a/AbilityKit/entry/src/main/ets/pages/PullUpCamera.ets +++ b/AbilityKit/entry/src/main/ets/pages/PullUpCamera.ets @@ -17,12 +17,12 @@ * FAQ:如何拉起相机界面 */ -// DocsCode 1 +// [Start start_camera_picker] import { common } from '@kit.AbilityKit'; import { camera, cameraPicker } from '@kit.CameraKit'; import { BusinessError } from '@kit.BasicServicesKit'; -let context = UIContext.getHostContext() as common.Context; +let context = getContext(this) as common.Context; async function startCameraPicker() { try { @@ -52,4 +52,4 @@ struct StartCameraPickerView { .alignItems(HorizontalAlign.Center) } } -// DocsCode 1 \ No newline at end of file +// [End start_camera_picker] \ No newline at end of file -- Gitee From 3592083f8e19a924bbc977d82869a08ad2baa6e5 Mon Sep 17 00:00:00 2001 From: kejintao Date: Sat, 17 May 2025 06:50:45 +0000 Subject: [PATCH 2/2] =?UTF-8?q?AbilityKit=E4=BF=AE=E6=94=B9=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=E4=B8=BA=E8=8B=B1=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: kejintao --- .../entry/src/main/ets/pages/PullUpBrowserApplication.ets | 2 +- AbilityKit/entry/src/main/ets/pages/PullUpCamera.ets | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AbilityKit/entry/src/main/ets/pages/PullUpBrowserApplication.ets b/AbilityKit/entry/src/main/ets/pages/PullUpBrowserApplication.ets index b8ec51ac..0539bca3 100644 --- a/AbilityKit/entry/src/main/ets/pages/PullUpBrowserApplication.ets +++ b/AbilityKit/entry/src/main/ets/pages/PullUpBrowserApplication.ets @@ -42,7 +42,7 @@ function startBrowsableAbility(context: common.UIAbilityContext): void { @Entry @Component struct BrowsableAbilityView { - @State message: string = '拉起浏览器并打开华为官网'; + @State message: string = 'Pull up the browser and open the Huawei official website'; build() { Row() { diff --git a/AbilityKit/entry/src/main/ets/pages/PullUpCamera.ets b/AbilityKit/entry/src/main/ets/pages/PullUpCamera.ets index 32fdb3b2..475d31fe 100644 --- a/AbilityKit/entry/src/main/ets/pages/PullUpCamera.ets +++ b/AbilityKit/entry/src/main/ets/pages/PullUpCamera.ets @@ -43,7 +43,7 @@ async function startCameraPicker() { struct StartCameraPickerView { build() { Column() { - Button("点击拉起相机") + Button("Click to pull up the camera") .onClick(() => startCameraPicker()) } .width("100%") -- Gitee