diff --git a/AppScope/app.json5 b/AppScope/app.json5 index b15abf3bfa0ec81ca58e5acb283cf42c2aa43035..dc44497b61618c8caab8b64125fd37e43e08d895 100644 --- a/AppScope/app.json5 +++ b/AppScope/app.json5 @@ -4,7 +4,7 @@ "vendor": "example", "versionCode": 1000000, "versionName": "1.0.0", - "icon": "$media:app_icon", + "icon": "$media:layered_image", "label": "$string:app_name" } } diff --git a/AppScope/resources/base/media/app_icon.png b/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/AppScope/resources/base/media/background.png b/AppScope/resources/base/media/background.png new file mode 100644 index 0000000000000000000000000000000000000000..923f2b3f27e915d6871871deea0420eb45ce102f Binary files /dev/null and b/AppScope/resources/base/media/background.png differ diff --git a/AppScope/resources/base/media/foreground.png b/AppScope/resources/base/media/foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..eb9427585b36d14b12477435b6419d1f07b3e0bb Binary files /dev/null and b/AppScope/resources/base/media/foreground.png differ diff --git a/AppScope/resources/base/media/layered_image.json b/AppScope/resources/base/media/layered_image.json new file mode 100644 index 0000000000000000000000000000000000000000..fb49920440fb4d246c82f9ada275e26123a2136a --- /dev/null +++ b/AppScope/resources/base/media/layered_image.json @@ -0,0 +1,7 @@ +{ + "layered-image": + { + "background" : "$media:background", + "foreground" : "$media:foreground" + } +} \ No newline at end of file diff --git a/README.en.md b/README.en.md index 3a6715819879a3a8a118d34f2c0138e84d726ed6..e6d391fb03fda1498cd68901f3e21cde1b6ea669 100644 --- a/README.en.md +++ b/README.en.md @@ -31,6 +31,6 @@ N/A ### Constraints 1. The sample is only supported on Huawei phones with standard systems. -2. HarmonyOS: HarmonyOS NEXT Developer Beta1 or later. -3. DevEco Studio: DevEco Studio NEXT Developer Beta1 or later. -4. HarmonyOS SDK: HarmonyOS NEXT Developer Beta1 SDK or later. +2. HarmonyOS: HarmonyOS 5.0.0 Release or later. +3. DevEco Studio: DevEco Studio 5.0.0 Release or later. +4. HarmonyOS SDK: HarmonyOS 5.0.0 Release SDK or later. diff --git a/README.md b/README.md index 575b644f69e7631526b8e02668dc594e28709773..c72b577822035ddafe5213bffb5ddd69bca225f8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# 优秀实践-一次开发,多端部署-音乐专辑 +# 一次开发,多端部署-音乐专辑 ### 简介 @@ -31,6 +31,6 @@ ### 约束与限制 1. 本示例仅支持标准系统上运行,支持设备:华为手机。 -2. HarmonyOS系统:HarmonyOS NEXT Developer Beta1及以上。 -3. DevEco Studio版本:DevEco Studio NEXT Developer Beta1及以上。 -4. HarmonyOS SDK版本:HarmonyOS NEXT Developer Beta1 SDK及以上。 \ No newline at end of file +2. HarmonyOS系统:HarmonyOS 5.0.0 Release及以上。 +3. DevEco Studio版本:DevEco Studio 5.0.0 Release及以上。 +4. HarmonyOS SDK版本:HarmonyOS 5.0.0 Release SDK及以上。 \ No newline at end of file diff --git a/features/musicList/src/main/ets/components/LyricsComponent.ets b/features/musicList/src/main/ets/components/LyricsComponent.ets index a0c76296535dfd1f10d25e36d11f00fa33d508c4..667b6a5b4296d84970432fd0113b054fd16f5638 100644 --- a/features/musicList/src/main/ets/components/LyricsComponent.ets +++ b/features/musicList/src/main/ets/components/LyricsComponent.ets @@ -55,7 +55,7 @@ export struct LyricsComponent { this.context .resourceManager .getRawFileContent(this.songList[this.selectIndex].lyric) .then((value: Uint8Array) => { let textDecoder = util.TextDecoder.create(PlayerConstants.ENCODING, { ignoreBOM: true }); - let stringData = textDecoder.decodeWithStream(value, { stream: false }); + let stringData = textDecoder.decodeToString(value, { stream: false }); if (this.songList[this.selectIndex].lyric.endsWith(LyricFile.KRC)) { this.mLrcEntryList = parseKrcLyric(stringData); } else if (this.songList[this.selectIndex].lyric.endsWith(LyricFile.LRC)) { diff --git a/features/musicList/src/main/ets/lyric/LrcUtils.ets b/features/musicList/src/main/ets/lyric/LrcUtils.ets index 7847e73d85c75e271fff7913b7effc071efd5b4c..38f2cdc9d9a89ea4773a9aee3304134971443169 100644 --- a/features/musicList/src/main/ets/lyric/LrcUtils.ets +++ b/features/musicList/src/main/ets/lyric/LrcUtils.ets @@ -35,7 +35,7 @@ const krcWordRegex2 = new RegExp('<(\\d+),(\\d+),(\\d+)>(.*)'); export async function getRawStringData(context: Context, rawFilePath: string): Promise { let value = await context.resourceManager.getRawFileContent(rawFilePath); let textDecoder = util.TextDecoder.create('utf-8', { ignoreBOM: true }); - let stringData = textDecoder.decodeWithStream(value, { stream: false }); + let stringData = textDecoder.decodeToString(value, { stream: false }); return stringData; } diff --git a/products/phone/src/main/module.json5 b/products/phone/src/main/module.json5 index 022f1bdcd8f81a5e8864639c13731d93af89611e..e2a51fb98f62c2d636f356997a3d2d0c5157ced3 100644 --- a/products/phone/src/main/module.json5 +++ b/products/phone/src/main/module.json5 @@ -31,7 +31,7 @@ "description": "$string:EntryAbility_desc", "icon": "$media:ic_music_icon", "label": "$string:EntryAbility_label", - "startWindowIcon": "$media:icon", + "startWindowIcon": "$media:startIcon", "startWindowBackground": "$color:start_window_background", "exported": true, "minWindowHeight": 780, diff --git a/products/phone/src/main/resources/base/media/startIcon.png b/products/phone/src/main/resources/base/media/startIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b Binary files /dev/null and b/products/phone/src/main/resources/base/media/startIcon.png differ