diff --git a/entry/src/main/ets/pages/NormalVideo.ets b/entry/src/main/ets/pages/NormalVideo.ets index c4a35be799b7f9bf9c066e902ecaa4487b8680da..3d1f6e0e15f0a8b303278db1c3877f08c6c37ef8 100644 --- a/entry/src/main/ets/pages/NormalVideo.ets +++ b/entry/src/main/ets/pages/NormalVideo.ets @@ -20,11 +20,13 @@ export function NormalVideoBuilder() { NormalVideo() } +// [Start NormalVideo_start] @Component struct NormalVideo { + // [StartExclude NormalVideo_start] pathStack: NavPathStack = new NavPathStack(); mainWindow: window.Window = AppStorage.get('mainWindow') as window.Window; - + // [EndExclude NormalVideo_start] build() { NavDestination() { Stack() { @@ -48,6 +50,7 @@ struct NormalVideo { .borderRadius('50%') .fillColor('rgba(255, 255, 255, 0.9)') .backgroundColor('rgba(0, 0, 0, 0.1)') + // [StartExclude NormalVideo_start] .onClick(() => { this.pathStack.pop(); }) @@ -59,7 +62,9 @@ struct NormalVideo { .lineHeight(26) .padding({ left: 8 }) .fontColor('rgba(255, 255, 255, 0.9)') + // [EndExclude NormalVideo_start] } + // [StartExclude NormalVideo_start] .width('100%') .height(56) .alignRules({ @@ -110,6 +115,7 @@ struct NormalVideo { bottom: { anchor: '__container__', align: VerticalAlign.Bottom }, middle: { anchor: '__container__', align: HorizontalAlign.Center } }) + // [EndExclude NormalVideo_start] } .width('100%') .height('100%') @@ -123,6 +129,7 @@ struct NormalVideo { .width('100%') .height('100%') } + // [StartExclude NormalVideo_start] .hideTitleBar(true) .onReady((context: NavDestinationContext) => { this.pathStack = context.pathStack; @@ -140,4 +147,6 @@ struct NormalVideo { this.mainWindow.setWindowSystemBarProperties(sysBarProps); }) } -} \ No newline at end of file + // [EndExclude NormalVideo_start] +} +// [End NormalVideo_start] \ No newline at end of file diff --git a/entry/src/main/ets/pages/NormalWeb.ets b/entry/src/main/ets/pages/NormalWeb.ets index 4c4a8dd23d5076a04805d5dbf7a13d6250634aa3..9bd113f5290a68632aaa5d9bfa9a075d4a26db69 100644 --- a/entry/src/main/ets/pages/NormalWeb.ets +++ b/entry/src/main/ets/pages/NormalWeb.ets @@ -13,23 +13,26 @@ * limitations under the License. */ +// [Start NormalWeb_start] import { webview } from '@kit.ArkWeb'; - +// [StartExclude NormalWeb_start] @Builder export function NormalWebBuilder() { NormalWeb() } - +// [EndExclude NormalWeb_start] @Entry @Component struct NormalWeb { @State currentIndex: number = 0; // The index of the currently selected tab page private controller: TabsController = new TabsController(); private webController: webview.WebviewController = new webview.WebviewController(); + // [StartExclude NormalWeb_start] pathStack: NavPathStack = new NavPathStack(); - + // [EndExclude NormalWeb_start] @Builder tabBuilder(title: string, targetIndex: number, selectedImg: Resource, normalImg: Resource) { + // [StartExclude NormalWeb_start] Column({ space: 4 }) { Image(this.currentIndex === targetIndex ? selectedImg : normalImg) .size({ @@ -44,15 +47,19 @@ struct NormalWeb { .height('100%') .padding({ bottom: 28 }) .justifyContent(FlexAlign.Center) + // [EndExclude NormalWeb_start] } build() { + // [StartExclude NormalWeb_start] NavDestination() { + // [EndExclude NormalWeb_start] Tabs({ barPosition: BarPosition.End, index: 0, controller: this.controller }) { TabContent() { Web({ src: $rawfile('test.html'), controller: this.webController }) } .tabBar(this.tabBuilder('Tab', 0, $r('app.media.tab_icon_activated'), $r('app.media.tab_icon'))) + // [StartExclude NormalWeb_start] .padding({ left: 16, right: 16, @@ -68,12 +75,14 @@ struct NormalWeb { right: 16, top: 10 }) + // [EndExclude NormalWeb_start] } .height('100%') .width('100%') .barOverlap(true) // Set TabBar to overlay on top of TabContent .barBackgroundBlurStyle(BlurStyle.NONE) // Set TabBar to be not blurry .barBackgroundColor('rgba(241, 243, 245, 1)') + // [StartExclude NormalWeb_start] .padding({ top: 36 }) .vertical(false) .barMode(BarMode.Fixed) @@ -88,5 +97,7 @@ struct NormalWeb { .onReady((context: NavDestinationContext) => { this.pathStack = context.pathStack; }) + // [EndExclude NormalWeb_start] } -} \ No newline at end of file +} +// [End NormalWeb_start] \ No newline at end of file diff --git a/entry/src/main/ets/pages/OpaqueVideo.ets b/entry/src/main/ets/pages/OpaqueVideo.ets index 3ba55cc1d5a8ba791da17178d512a484ccf7fb41..5545fe482bbd01b1863f19310809353be5038581 100644 --- a/entry/src/main/ets/pages/OpaqueVideo.ets +++ b/entry/src/main/ets/pages/OpaqueVideo.ets @@ -20,14 +20,18 @@ export function OpaqueVideoBuilder() { OpaqueVideo() } +// [Start OpaqueVideo_start] @Entry @Component struct OpaqueVideo { + // [StartExclude OpaqueVideo_start] pathStack: NavPathStack = new NavPathStack(); mainWindow: window.Window = AppStorage.get('mainWindow') as window.Window; - + // [EndExclude OpaqueVideo_start] build() { + // [StartExclude OpaqueVideo_start] NavDestination() { + // [EndExclude OpaqueVideo_start] RelativeContainer() { // Bottom UI component Image($r('app.media.watermark')) @@ -55,6 +59,7 @@ struct OpaqueVideo { .height('100%') .width('100%') } + // [StartExclude OpaqueVideo_start] .hideTitleBar(true) .onReady((context: NavDestinationContext) => { this.pathStack = context.pathStack; @@ -72,4 +77,6 @@ struct OpaqueVideo { this.mainWindow.setWindowSystemBarProperties(sysBarProps); }) } -} \ No newline at end of file + // [EndExclude OpaqueVideo_start] +} +// [End OpaqueVideo_start] \ No newline at end of file diff --git a/entry/src/main/ets/pages/TransparentVideo.ets b/entry/src/main/ets/pages/TransparentVideo.ets index 0a58f92cd130a7e59fece77616d02ac7de3d6d07..a3501e5c765ea3d2057f75526f4cd7f734eaf828 100644 --- a/entry/src/main/ets/pages/TransparentVideo.ets +++ b/entry/src/main/ets/pages/TransparentVideo.ets @@ -20,14 +20,18 @@ export function TransparentVideoBuilder() { TransparentVideo() } +// [Start TransparentVideo_start] @Entry @Component struct TransparentVideo { + // [StartExclude TransparentVideo_start] pathStack: NavPathStack = new NavPathStack(); mainWindow: window.Window = AppStorage.get('mainWindow') as window.Window; - + // [EndExclude TransparentVideo_start] build() { + // [StartExclude TransparentVideo_start] NavDestination() { + // [EndExclude TransparentVideo_start] RelativeContainer() { // Bottom UI component Image($r('app.media.watermark')) @@ -55,6 +59,7 @@ struct TransparentVideo { .height('100%') .width('100%') } + // [StartExclude TransparentVideo_start] .hideTitleBar(true) .onReady((context: NavDestinationContext) => { this.pathStack = context.pathStack; @@ -72,4 +77,6 @@ struct TransparentVideo { this.mainWindow.setWindowSystemBarProperties(sysBarProps); }) } -} \ No newline at end of file + // [EndExclude TransparentVideo_start] +} +// [End TransparentVideo_start] \ No newline at end of file diff --git a/entry/src/main/ets/pages/VideoWithBlur.ets b/entry/src/main/ets/pages/VideoWithBlur.ets index 1ebb6a45d11b242bb556ef9bce811ac5b399b48f..5395209fc519018573e8f396e17441f0aa76a74d 100644 --- a/entry/src/main/ets/pages/VideoWithBlur.ets +++ b/entry/src/main/ets/pages/VideoWithBlur.ets @@ -20,12 +20,14 @@ export function VideoWithBlurBuilder() { VideoWithBlur() } +// [Start VideoWithBlur_start] @Entry @Component struct VideoWithBlur { + // [StartExclude VideoWithBlur_start] pathStack: NavPathStack = new NavPathStack(); mainWindow: window.Window = AppStorage.get('mainWindow') as window.Window; - + // [EndExclude VideoWithBlur_start] build() { NavDestination() { Stack() { @@ -51,6 +53,7 @@ struct VideoWithBlur { .backgroundColor('rgba(0, 0, 0, 0.1)') .backdropBlur(40) // Set this component background blur .backgroundBlurStyle(BlurStyle.BACKGROUND_REGULAR) + // [StartExclude VideoWithBlur_start] .onClick(() => { this.pathStack.pop(); }) @@ -62,7 +65,9 @@ struct VideoWithBlur { .lineHeight(26) .padding({ left: 8 }) .fontColor('rgba(255, 255, 255, 0.9)') + // [EndExclude VideoWithBlur_start] } + // [StartExclude VideoWithBlur_start] .width('100%') .height(56) .alignRules({ @@ -113,6 +118,7 @@ struct VideoWithBlur { bottom: { anchor: '__container__', align: VerticalAlign.Bottom }, middle: { anchor: '__container__', align: HorizontalAlign.Center } }) + // [EndExclude VideoWithBlur_start] } .width('100%') .height('100%') @@ -126,6 +132,7 @@ struct VideoWithBlur { .width('100%') .height('100%') } + // [StartExclude VideoWithBlur_start] .hideTitleBar(true) .onReady((context: NavDestinationContext) => { this.pathStack = context.pathStack; @@ -143,4 +150,6 @@ struct VideoWithBlur { this.mainWindow.setWindowSystemBarProperties(sysBarProps); }) } -} \ No newline at end of file + // [EndExclude VideoWithBlur_start] +} +// [End VideoWithBlur_start] diff --git a/entry/src/main/ets/pages/WebWithBlur.ets b/entry/src/main/ets/pages/WebWithBlur.ets index c7378d9a8207b7f20f3fedc46b0010c0456349cb..2a36caed9766111da57fa4365ead41c5b8b5d61f 100644 --- a/entry/src/main/ets/pages/WebWithBlur.ets +++ b/entry/src/main/ets/pages/WebWithBlur.ets @@ -13,23 +13,27 @@ * limitations under the License. */ -import { webview } from '@kit.ArkWeb'; +// [Start WebWithBlur_start] +import { webview } from '@kit.ArkWeb'; +// [StartExclude WebWithBlur_start] @Builder export function WebWithBlurBuilder() { WebWithBlur() } - +// [EndExclude WebWithBlur_start] @Entry @Component struct WebWithBlur { @State currentIndex: number = 0; // The index of the currently selected tab page private controller: TabsController = new TabsController(); private webController: webview.WebviewController = new webview.WebviewController(); + // [StartExclude WebWithBlur_start] pathStack: NavPathStack = new NavPathStack(); - + // [EndExclude WebWithBlur_start] @Builder tabBuilder(title: string, targetIndex: number, selectedImg: Resource, normalImg: Resource) { + // [StartExclude WebWithBlur_start] Column({ space: 4 }) { Image(this.currentIndex === targetIndex ? selectedImg : normalImg) .size({ @@ -44,15 +48,19 @@ struct WebWithBlur { .height('100%') .padding({ bottom: 28 }) .justifyContent(FlexAlign.Center) + // [EndExclude WebWithBlur_start] } build() { + // [StartExclude WebWithBlur_start] NavDestination() { + // [EndExclude WebWithBlur_start] Tabs({ barPosition: BarPosition.End, index: 0, controller: this.controller }) { TabContent() { Web({ src: $rawfile('test.html'), controller: this.webController }) } .tabBar(this.tabBuilder('Tab', 0, $r('app.media.tab_icon_activated'), $r('app.media.tab_icon'))) + // [StartExclude WebWithBlur_start] .padding({ left: 16, right: 16, @@ -68,11 +76,13 @@ struct WebWithBlur { right: 16, top: 10 }) + // [EndExclude WebWithBlur_start] } .height('100%') .width('100%') .barOverlap(true) // Set TabBar to be blurred and overlay on top of TabContent .barBackgroundColor('rgba(241, 243, 245, 0.3)') + // [StartExclude WebWithBlur_start] .padding({ top: 36 }) .vertical(false) .barMode(BarMode.Fixed) @@ -87,5 +97,7 @@ struct WebWithBlur { .onReady((context: NavDestinationContext) => { this.pathStack = context.pathStack; }) + // [EndExclude WebWithBlur_start] } -} \ No newline at end of file +} +// [End WebWithBlur_start] \ No newline at end of file