diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets index de0d46f062ee38d3dbb5923aea6eb1019c89d627..1e0e6ca67041d7588f5b83a8a869dc3a52507ddd 100644 --- a/entry/src/main/ets/pages/Index.ets +++ b/entry/src/main/ets/pages/Index.ets @@ -39,11 +39,16 @@ struct TipDialog { .justifyContent(FlexAlign.Center) .alignItems(VerticalAlign.Center) + Blank() + Text($r('app.string.tip_text')) .fontSize(16) .fontWeight(FontWeight.Medium) .lineHeight(21) .fontColor($r('app.color.tip')) + .margin({ left: 16, right: 16 }) + + Blank() Row() { Text($r('app.string.tip_get')) @@ -88,7 +93,7 @@ export struct LiveViewLockScreenPage { autoCancel: true, cornerRadius: 32, width: 338, - height: 141 + height: 175, }); aboutToAppear(): void { diff --git a/entry/src/main/ets/view/TrafficInfoView.ets b/entry/src/main/ets/view/TrafficInfoView.ets index f874b063e6e3e59e41c507708d67617ef6f9ebd7..6cccda4a26ad342d4ef6559f4b29ca9d3d6dd01c 100644 --- a/entry/src/main/ets/view/TrafficInfoView.ets +++ b/entry/src/main/ets/view/TrafficInfoView.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +import { promptAction } from '@kit.ArkUI'; import { LiveView } from '../utils/LiveView' @Component @@ -78,6 +79,12 @@ export struct TrafficInfoView { .onClick(() => { this.isShowButton = false; LiveView.getInstance().createLiveView(); + this.getUIContext().getPromptAction().showToast({ + message: $r('app.string.toast'), + duration: 2000, + showMode: promptAction.ToastShowMode.DEFAULT, + bottom: 180 + }); }) Blank() Button($r('app.string.Finish')) @@ -88,6 +95,12 @@ export struct TrafficInfoView { .onClick(() => { this.isShowButton = false; LiveView.getInstance().finishLiveView(); + this.getUIContext().getPromptAction().showToast({ + message: $r('app.string.toast'), + duration: 2000, + showMode: promptAction.ToastShowMode.DEFAULT, + bottom: 180 + }); }) Blank() } diff --git a/entry/src/main/resources/base/element/string.json b/entry/src/main/resources/base/element/string.json index 46b8d3ab1ee3378f2247858c69af17356f2f2399..aa9d46ca0d04a5a5cdc85f6bbeabf3f4378e1010 100644 --- a/entry/src/main/resources/base/element/string.json +++ b/entry/src/main/resources/base/element/string.json @@ -86,11 +86,15 @@ }, { "name": "tip_text", - "value": "申请锁屏沉浸实况窗权限可完整体验该功能" + "value": " 本案例已完成Pura X内外屏适配和实况窗功能开发,因涉及权限申请,仅做UI展示,具体开发请参考示例代码。" }, { "name": "tip_get", "value": "知道了" + }, + { + "name": "toast", + "value": "仅做功能原型展示,具体业务需自行实现。" } ] } \ No newline at end of file diff --git a/entry/src/main/resources/en_US/element/string.json b/entry/src/main/resources/en_US/element/string.json index a12041fb40f87c6fd7c777f15c5467e1ab32c217..4d1556f1a8880625f4c04d873422a73eedf127c9 100644 --- a/entry/src/main/resources/en_US/element/string.json +++ b/entry/src/main/resources/en_US/element/string.json @@ -91,6 +91,10 @@ { "name": "tip_get", "value": "I get" + }, + { + "name": "toast", + "value": "Just a functional prototype—you’ll need to implement the business logic yourself." } ] } \ No newline at end of file diff --git a/entry/src/main/resources/zh_CN/element/string.json b/entry/src/main/resources/zh_CN/element/string.json index 46b8d3ab1ee3378f2247858c69af17356f2f2399..aa9d46ca0d04a5a5cdc85f6bbeabf3f4378e1010 100644 --- a/entry/src/main/resources/zh_CN/element/string.json +++ b/entry/src/main/resources/zh_CN/element/string.json @@ -86,11 +86,15 @@ }, { "name": "tip_text", - "value": "申请锁屏沉浸实况窗权限可完整体验该功能" + "value": " 本案例已完成Pura X内外屏适配和实况窗功能开发,因涉及权限申请,仅做UI展示,具体开发请参考示例代码。" }, { "name": "tip_get", "value": "知道了" + }, + { + "name": "toast", + "value": "仅做功能原型展示,具体业务需自行实现。" } ] } \ No newline at end of file