素材接入:分享面板图标 + 启动闪屏 + App 图标(从 docs/Res 拷入)
- 分享图标:shareWechat/QQ/Douyin@3x → entry media,SharePanel 颜色块占位替换为
真实图标 Image($r('app.media.share_*'))
- 启动闪屏:LaunchImage(2436x1125 横屏) → launch_image,SplashPage 改为全屏背景图
+ 底部叠加启动进度/公告(白字)
- App 图标:AppIcon 替换 AppScope/entry 的 layered_image foreground 前景层
docs/Res 为只读原始素材库,按需拷入;显示效果待真机/模拟器确认
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 14 KiB |
@@ -26,9 +26,9 @@ export struct SharePanel {
|
||||
.margin({ top: 16, bottom: 16 })
|
||||
|
||||
Row() {
|
||||
this.platformButton('微信', 'wechat', '#07C160')
|
||||
this.platformButton('QQ', 'qq', '#12B7F5')
|
||||
this.platformButton('抖音', 'douyin', '#000000')
|
||||
this.platformButton('微信', 'wechat', $r('app.media.share_wechat'))
|
||||
this.platformButton('QQ', 'qq', $r('app.media.share_qq'))
|
||||
this.platformButton('抖音', 'douyin', $r('app.media.share_douyin'))
|
||||
}
|
||||
.width('100%')
|
||||
.justifyContent(FlexAlign.SpaceEvenly)
|
||||
@@ -55,9 +55,12 @@ export struct SharePanel {
|
||||
}
|
||||
|
||||
@Builder
|
||||
platformButton(label: string, platform: string, color: string) {
|
||||
platformButton(label: string, platform: string, icon: Resource) {
|
||||
Column() {
|
||||
Circle({ width: 56, height: 56 }).fill(color)
|
||||
Image(icon)
|
||||
.width(56)
|
||||
.height(56)
|
||||
.objectFit(ImageFit.Contain)
|
||||
Text(label)
|
||||
.fontSize(13)
|
||||
.fontColor('#333333')
|
||||
|
||||
@@ -40,27 +40,38 @@ export struct SplashPage {
|
||||
|
||||
build() {
|
||||
NavDestination() {
|
||||
Column({ space: 16 }) {
|
||||
Text('TSGame')
|
||||
.fontSize(28)
|
||||
.fontWeight(FontWeight.Bold)
|
||||
Stack() {
|
||||
// 启动闪屏全屏背景(docs/Res/LaunchImage,横屏 2436x1125)
|
||||
Image($r('app.media.launch_image'))
|
||||
.width('100%')
|
||||
.height('100%')
|
||||
.objectFit(ImageFit.Cover)
|
||||
// 启动进度/公告叠加在底部
|
||||
Column({ space: 12 }) {
|
||||
if (this.blocked === '') {
|
||||
Text(`${this.stageText} ${this.percent}%`)
|
||||
.fontSize(14)
|
||||
.fontColor(Color.Gray)
|
||||
.fontColor(Color.White)
|
||||
Progress({ value: this.percent, total: 100, type: ProgressType.Linear })
|
||||
.width('60%')
|
||||
} else {
|
||||
Text(this.blocked)
|
||||
.fontSize(16)
|
||||
.fontColor(Color.Red)
|
||||
.fontColor(Color.White)
|
||||
.textAlign(TextAlign.Center)
|
||||
.padding({ left: 24, right: 24 })
|
||||
.backgroundColor('rgba(0,0,0,0.5)')
|
||||
.borderRadius(8)
|
||||
.padding(12)
|
||||
.margin({ left: 24, right: 24 })
|
||||
}
|
||||
}
|
||||
.width('100%')
|
||||
.height('100%')
|
||||
.justifyContent(FlexAlign.Center)
|
||||
.justifyContent(FlexAlign.End)
|
||||
.padding({ bottom: 60 })
|
||||
}
|
||||
.width('100%')
|
||||
.height('100%')
|
||||
}
|
||||
.hideTitleBar(true)
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 5.0 KiB |