diff --git a/README.en.md b/README.en.md index 65184cd6b2f2b6834588171a11d1db0e29ef575e..64f9fd7c688a2b22e0a97f341738d8cdf10c88d5 100644 --- a/README.en.md +++ b/README.en.md @@ -9,7 +9,7 @@ This sample illustrates a typical UI effect. * During automatic playback, the images transition automatically, with the progress bar at the bottom slowly advancing to match the display duration of each image. * During manually playback, the progress bar below adjusts to indicate the incomplete or complete state of the viewing progress based on the image change. ## Preview -![](screenshots/device/image_en.gif) +![](screenshots/device/Image_phone.en.gif) ## Project Directory ```` @@ -42,13 +42,10 @@ The progress bar is implemented by stacking Row containers in a cascading layout N/A ## Constraints -* The sample app is supported only on Huawei phones running the standard system. +1. The sample app is supported only on Huawei phones, tablets, and 2in1 devices running the standard system. +2. The HarmonyOS version must be HarmonyOS 5.0.0 Release or later. -* The HarmonyOS version must be HarmonyOS NEXT Developer Beta5 or later. +3. The DevEco Studio version must be DevEco Studio 5.0.0 Release or later. - -* The DevEco Studio version must be DevEco Studio NEXT Developer Beta5 or later. - - -* The HarmonyOS SDK version must be HarmonyOS NEXT Developer Beta5 or later. \ No newline at end of file +4. The HarmonyOS SDK version must be HarmonyOS 5.0.0 Release or later. \ No newline at end of file diff --git a/README.md b/README.md index 8b4c99fbea5ea3bdb81984a1d3c790261307619a..5fdaf93e66012afe5f92c76ffd96e1b368d9157d 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,9 @@ 会跟随图片的切换而切换。 ## 预览效果 -![](./screenshots/device/image.gif) +| 手机 | 折叠屏(展开态) | 平板 | +|-----------------------------------------|----------------------------------------|------------------------------------------| +| ![](screenshots/device/Image_phone.gif) | ![](screenshots/device/Image.gif) | ![](screenshots/device/Image_tablet.gif) | ## 工程目录 ``` ├──entry/src/main/ets // 代码区 @@ -38,10 +40,10 @@ 无 ## 约束与限制 -* 本示例仅支持标准系统上运行,支持设备:华为手机。 +1. 本示例仅支持标准系统上运行,支持设备:phone,tablet,2in1。 -* HarmonyOS系统:HarmonyOS NEXT Developer Beta5及以上。 +2. HarmonyOS系统:HarmonyOS NEXT Developer Beta5及以上。 -* DevEco Studio版本:DevEco Studio NEXT Developer Beta5及以上。 +3. DevEco Studio版本:DevEco Studio NEXT Developer Beta5及以上。 -* HarmonyOS SDK版本:HarmonyOS NEXT Developer Beta5 SDK及以上。 \ No newline at end of file +4. HarmonyOS SDK版本:HarmonyOS NEXT Developer Beta5 SDK及以上。 \ No newline at end of file diff --git a/entry/src/main/ets/common/CommonConstants.ets b/entry/src/main/ets/common/CommonConstants.ets index 730a632f3e1ab42d41d1c3c99729e03b5119d182..ed6c20644cfa5d7d83c9594e8407826ab07a2648 100644 --- a/entry/src/main/ets/common/CommonConstants.ets +++ b/entry/src/main/ets/common/CommonConstants.ets @@ -17,147 +17,142 @@ export class CommonConstants { /** * Full percent. */ - static readonly FULL_PERCENT: string = '100%'; - - /** - * Foldable percent. - */ - static readonly Foldable_PERCENT: string = '70%'; + public static readonly FULL_PERCENT: string = '100%'; /** * None percent. */ - static readonly NONE_PERCENT: string = '0'; + public static readonly NONE_PERCENT: string = '0'; /** * Swiper initially currentIndex. */ - static readonly INITIALLY_CURRENT_INDEX: number = -1; + public static readonly INITIALLY_CURRENT_INDEX: number = -1; /** * Swiper slide index. */ - static readonly SLIDE_INDEX: number = -1; + public static readonly SLIDE_INDEX: number = -1; /** * Swiper image duration. */ - static readonly IMAGE_DURATION: number = 300; + public static readonly IMAGE_DURATION: number = 300; /** * Swiper duration. */ - static readonly DURATION: number = 3000; + public static readonly DURATION: number = 3000; /** * Swiper interval. */ - static readonly INTERVAL: number = 3000; + public static readonly INTERVAL: number = 3000; /** * Swiper item space. */ - static readonly ITEM_SPACE: number = 0; + public static readonly ITEM_SPACE: number = 0; /** * Swiper interval duration. */ - static readonly INITIALLY_DURATION: number = 300; + public static readonly INITIALLY_DURATION: number = 300; /** * Swiper duration. */ - static readonly NO_DURATION: number = 0; + public static readonly NO_DURATION: number = 0; /** * Swiper max height. */ - static readonly SWIPER_MAX_HEIGHT: number = 333; + public static readonly SWIPER_MAX_HEIGHT: number = 333; /** * Swiper cached count. */ - static readonly SWIPER_CACHED_COUNT: number = 2; + public static readonly SWIPER_CACHED_COUNT: number = 2; /** * Progress wrap height. */ - static readonly PROGRESS_WRAP_HEIGHT: number = 50; + public static readonly PROGRESS_WRAP_HEIGHT: number = 50; /** * zIndex. */ - static readonly Z_INDEX_0: number = 0; + public static readonly Z_INDEX_0: number = 0; /** * zIndex. */ - static readonly Z_INDEX_1: number = 1; + public static readonly Z_INDEX_1: number = 1; /** * zIndex. */ - static readonly Z_INDEX_2: number = 2; + public static readonly Z_INDEX_2: number = 2; /** * zIndex. */ - static readonly Z_INDEX_3: number = 3; + public static readonly Z_INDEX_3: number = 3; /** * Swiper initially Index. */ - static readonly INITIALLY_INDEX: number = 0; + public static readonly INITIALLY_INDEX: number = 0; /** * Layout weight. */ - static readonly LAYOUT_WEIGHT: number = 1; + public static readonly LAYOUT_WEIGHT: number = 1; /** * Column height. */ - static readonly COLUMN_HEIGHT: number = 100; + public static readonly COLUMN_HEIGHT: number = 100; /** * Multipart form text weight. */ - static readonly FORM_TEXT_FONT_WEIGHT: number = 500; + public static readonly FORM_TEXT_FONT_WEIGHT: number = 500; /** * Row space. */ - static readonly ROW_SPACE: number = 5; + public static readonly ROW_SPACE: number = 5; /** * Column space. */ - static readonly COLUMN_SPACE: number = 16; + public static readonly COLUMN_SPACE: number = 16; /** * Column space inside. */ - static readonly COLUMN_SPACE_INSIDE: number = 8; + public static readonly COLUMN_SPACE_INSIDE: number = 8; /** * Breakpoint sm. */ - static readonly BREAK_POINT_SM: string = 'sm'; + public static readonly BREAK_POINT_SM: string = 'sm'; /** * Breakpoint md. */ - static readonly BREAK_POINT_MD: string = 'md'; + public static readonly BREAK_POINT_MD: string = 'md'; /** * Breakpoint lg. */ - static readonly BREAK_POINT_LG: string = 'lg'; + public static readonly BREAK_POINT_LG: string = 'lg'; } export class BreakpointType { - sm: T - md: T - lg: T + private sm: T + private md: T + private lg: T constructor(sm: T, md: T, lg: T) { this.sm = sm; diff --git a/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets b/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets index f761896856d183e1085b804cfde0d84aeab41ee8..6b744d7eaa66e51e79fc4e0896e251292ee767c5 100644 --- a/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets +++ b/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets @@ -17,11 +17,11 @@ import { hilog } from '@kit.PerformanceAnalysisKit'; import { BackupExtensionAbility, BundleVersion } from '@kit.CoreFileKit'; export default class EntryBackupAbility extends BackupExtensionAbility { - async onBackup () { + async onBackup() { hilog.info(0x0000, 'testTag', 'onBackup ok'); } - async onRestore (bundleVersion : BundleVersion) { + async onRestore(bundleVersion: BundleVersion) { hilog.info(0x0000, 'testTag', 'onRestore ok %{public}s', JSON.stringify(bundleVersion)); } } \ No newline at end of file diff --git a/entry/src/main/ets/util/DataSource.ets b/entry/src/main/ets/util/DataSource.ets index 18b7523141a672f67c344e799086512bb48f0be3..656ce4f48f36770de6ce408d9008b49e004b3a7a 100644 --- a/entry/src/main/ets/util/DataSource.ets +++ b/entry/src/main/ets/util/DataSource.ets @@ -36,9 +36,9 @@ class DataSource implements IDataSource { } class PhotoData { - total: number = 7; - value: number = 0; - id: number = -1; + public total: number = 7; + public value: number = 0; + public id: number = -1; } export { DataSource, PhotoData } \ No newline at end of file diff --git a/entry/src/main/resources/base/element/string.json b/entry/src/main/resources/base/element/string.json index 8de51966425427c6ca1616898ee0f05324a5de30..8d2284cab8904033955f119830f3a34bb8631bd4 100644 --- a/entry/src/main/resources/base/element/string.json +++ b/entry/src/main/resources/base/element/string.json @@ -14,7 +14,7 @@ }, { "name": "cute_pet", - "value": "@Cute Pet" + "value": "@Daily Scenery" }, { "name": "dots", @@ -26,15 +26,15 @@ }, { "name": "pets", - "value": "#Pets" + "value": "#Nature" }, { "name": "dog", - "value": "#Dog" + "value": "#Scenery" }, { "name": "spoiled", - "value": "#Spoiled" + "value": "#Daily Scenery" }, { "name": "placeholder", diff --git a/entry/src/main/resources/base/media/5.jpg b/entry/src/main/resources/base/media/5.jpg deleted file mode 100644 index f6e47f8c6b51bafd7165394e263fc12026dda082..0000000000000000000000000000000000000000 Binary files a/entry/src/main/resources/base/media/5.jpg and /dev/null differ diff --git a/entry/src/main/resources/base/media/6.jpg b/entry/src/main/resources/base/media/6.jpg deleted file mode 100644 index 6497585c09712892c5b638937f6866f63932ca2b..0000000000000000000000000000000000000000 Binary files a/entry/src/main/resources/base/media/6.jpg and /dev/null differ diff --git a/entry/src/main/resources/base/media/7.jpg b/entry/src/main/resources/base/media/7.jpg deleted file mode 100644 index 6bd3b541382433a660ecf3c60120ff11ae824a88..0000000000000000000000000000000000000000 Binary files a/entry/src/main/resources/base/media/7.jpg and /dev/null differ diff --git a/entry/src/main/resources/base/media/back.png b/entry/src/main/resources/base/media/back.png deleted file mode 100644 index d781ec00721fe355c96204bedf517ff3062c5ef2..0000000000000000000000000000000000000000 Binary files a/entry/src/main/resources/base/media/back.png and /dev/null differ diff --git a/entry/src/main/resources/base/media/comments.svg b/entry/src/main/resources/base/media/comments.svg deleted file mode 100644 index 8541166dce4f5ea8f9b5f3ccf24fa5b2649ead71..0000000000000000000000000000000000000000 --- a/entry/src/main/resources/base/media/comments.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - Created with Pixso. - - - - - - - - - - - diff --git a/entry/src/main/resources/base/media/favor.svg b/entry/src/main/resources/base/media/favor.svg deleted file mode 100644 index d79b33902c6a45a8603b39c7dc5c486592e8d214..0000000000000000000000000000000000000000 --- a/entry/src/main/resources/base/media/favor.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - Created with Pixso. - - - - - - - - - - - diff --git a/entry/src/main/resources/base/media/recording.svg b/entry/src/main/resources/base/media/recording.svg deleted file mode 100644 index 1395e9529be0fe0b39f83a29b7338a92e10b8279..0000000000000000000000000000000000000000 --- a/entry/src/main/resources/base/media/recording.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - Created with Pixso. - - - - - - - - - - - - diff --git a/entry/src/main/resources/base/media/share.svg b/entry/src/main/resources/base/media/share.svg deleted file mode 100644 index 2cad06df681ccf667bf2a18ee979bcd87084a881..0000000000000000000000000000000000000000 --- a/entry/src/main/resources/base/media/share.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - Created with Pixso. - - - - - - - - - - - diff --git a/entry/src/main/resources/en_US/element/string.json b/entry/src/main/resources/en_US/element/string.json index 8de51966425427c6ca1616898ee0f05324a5de30..8d2284cab8904033955f119830f3a34bb8631bd4 100644 --- a/entry/src/main/resources/en_US/element/string.json +++ b/entry/src/main/resources/en_US/element/string.json @@ -14,7 +14,7 @@ }, { "name": "cute_pet", - "value": "@Cute Pet" + "value": "@Daily Scenery" }, { "name": "dots", @@ -26,15 +26,15 @@ }, { "name": "pets", - "value": "#Pets" + "value": "#Nature" }, { "name": "dog", - "value": "#Dog" + "value": "#Scenery" }, { "name": "spoiled", - "value": "#Spoiled" + "value": "#Daily Scenery" }, { "name": "placeholder", diff --git a/entry/src/main/resources/zh_CN/element/string.json b/entry/src/main/resources/zh_CN/element/string.json index 21ce68631903fe9e86068c750c480cf3a7a5ea44..f2e9397671987fa87740b300812596e013e78940 100644 --- a/entry/src/main/resources/zh_CN/element/string.json +++ b/entry/src/main/resources/zh_CN/element/string.json @@ -14,7 +14,7 @@ }, { "name": "cute_pet", - "value": "@欢乐萌宠" + "value": "@每日一景" }, { "name": "dots", @@ -26,15 +26,15 @@ }, { "name": "pets", - "value": "#宠物" + "value": "#自然" }, { "name": "dog", - "value": "#小狗" + "value": "#风景" }, { "name": "spoiled", - "value": "#萌坏了" + "value": "#每日一景" }, { "name": "placeholder", diff --git a/screenshots/device/image.gif b/screenshots/device/Image.gif similarity index 33% rename from screenshots/device/image.gif rename to screenshots/device/Image.gif index e33ee64ffdf0da904544ba83724908938876a195..2aa610476a9937f52f1b61580095db00b2e58e78 100644 Binary files a/screenshots/device/image.gif and b/screenshots/device/Image.gif differ diff --git a/screenshots/device/Image_phone.en.gif b/screenshots/device/Image_phone.en.gif new file mode 100644 index 0000000000000000000000000000000000000000..29b79e410a751c52ed637ed84f851ad7e17f3af1 Binary files /dev/null and b/screenshots/device/Image_phone.en.gif differ diff --git a/screenshots/device/Image_phone.gif b/screenshots/device/Image_phone.gif new file mode 100644 index 0000000000000000000000000000000000000000..b2254723b8dcf9349f4e929e73d0b69fb65ccf6c Binary files /dev/null and b/screenshots/device/Image_phone.gif differ diff --git a/screenshots/device/image_en.gif b/screenshots/device/Image_tablet.gif similarity index 50% rename from screenshots/device/image_en.gif rename to screenshots/device/Image_tablet.gif index dd84ec919bbff07f310ff84a6abbc1f0849eeb35..460778bdabebd557a2e69f8c75ba59cf2e694041 100644 Binary files a/screenshots/device/image_en.gif and b/screenshots/device/Image_tablet.gif differ