diff --git a/AppScope/app.json5 b/AppScope/app.json5 new file mode 100644 index 0000000000000000000000000000000000000000..8272f273572a94d26c303d6267f36f759ffb6e64 --- /dev/null +++ b/AppScope/app.json5 @@ -0,0 +1,10 @@ +{ + "app": { + "bundleName": "com.example.multiticketclass", + "vendor": "example", + "versionCode": 1000000, + "versionName": "1.0.0", + "icon": "$media:app_icon", + "label": "$string:app_name" + } +} diff --git a/AppScope/resources/base/element/string.json b/AppScope/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..e5adf926884b2f20f1300c79edc417d9fe555f8a --- /dev/null +++ b/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "app_name", + "value": "multiTicketClass" + } + ] +} diff --git a/AppScope/resources/base/media/app_icon.png b/AppScope/resources/base/media/app_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..cd45accb1dfd2fd0da16c732c72faa6e46b26521 Binary files /dev/null and b/AppScope/resources/base/media/app_icon.png differ diff --git a/README.en.md b/README.en.md deleted file mode 100644 index 6ba544e28078f441adf86b21bc082386639e2408..0000000000000000000000000000000000000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# MultiTicketClass - -#### Description -{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md index 01cd4269601bff88938e8dd26ce6a64094eb8a9d..89c8c8d35821f9b3e709f580a3cefc92daed844c 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,77 @@ -# MultiTicketClass +## 一多股票类的关键场景实现 -#### 介绍 -{**以下是 Gitee 平台说明,您可以替换此简介** -Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 -无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} +### 介绍 -#### 软件架构 -软件架构说明 +本示例主要使用栅格布局和List组件相结合的方式,实现了股票类差异化的多场景响应式变化效果。 +### 效果预览 -#### 安装教程 +本示例在预览器中的效果: -1. xxxx -2. xxxx -3. xxxx +**tab自适应居中**: -#### 使用说明 +| 手机 | 折叠屏(展开态) | 平板 | +|-------------------------------------|-------------------------------------|-------------------------------------| +| ![](screenshots/Devices/image1.png) | ![](screenshots/Devices/image2.png) | ![](screenshots/Devices/image3.png) | -1. xxxx -2. xxxx -3. xxxx +**表格自适应延伸**: -#### 参与贡献 +| 手机 | 折叠屏(展开态) | 平板 | +|-------------------------------------|-------------------------------------|-------------------------------------| +| ![](screenshots/Devices/image4.png) | ![](screenshots/Devices/image5.png) | ![](screenshots/Devices/image6.png) | -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request +**双tab自适应居中**: +| 手机 | 折叠屏(展开态) | 平板 | +|-------------------------------------|-------------------------------------|-------------------------------------| +| ![](screenshots/Devices/image7.png) | ![](screenshots/Devices/image8.png) | ![](screenshots/Devices/image9.png) | -#### 特技 +使用说明: -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 -5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) +1.可以在预览器中查看页面效果,也可在对应设备上查看页面效果。 + +2.也可在PC上拖动窗口变化,查看组件的响应式变化。 + +### 工程目录 + +``` +├──entry/src/main/ets // 代码区 +│ ├──constants +│ │ ├──CommonConstants.ets // 常用常量 +│ │ └──ListDataConstants.ets // 列表数据常量 +│ ├──entryability +│ │ └──EntryAbility.ets +│ ├──pages +│ │ ├──AdaptiveTabCenteringIndex.ets // tab自适应居中页 +│ │ ├──DoubleTabAdaptiveCenteringIndex.ets // 双tab自适应居中页 +│ │ ├──Index.ets // 首页 +│ │ └──TableAdaptiveExtensionIndex.ets // 表格自适应延伸页 +│ └──utils +│ ├──BreakpointType.ets // 断点类型 +│ └──Logger.ets // 日志 +└──entry/src/main/resources // 应用资源目录 + +``` + +### 具体实现 + +* 使用栅格布局监听断点变化,不同断点List组件的子组件间隔不同,同时设置Flex布局的justifyContent属性为FlexAlign.Center,实现居中对齐自适应拉伸。 +* 使用Blank组件实现中间空格自适应拉伸。 + +### 相关权限 + +不涉及。 + +### 依赖 + +不涉及。 + +### 约束与限制 + +1. 本示例仅支持标准系统上运行,支持设备:华为手机。 + +2. HarmonyOS系统:HarmonyOS NEXT Developer Beta1及以上。 + +3. DevEco Studio版本:DevEco Studio NEXT Developer Beta1及以上。 + +4. HarmonyOS SDK版本:HarmonyOS NEXT Developer Beta1 SDK及以上。 diff --git a/build-profile.json5 b/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..c033ce4278fb0641d84107c3c134047ac487368e --- /dev/null +++ b/build-profile.json5 @@ -0,0 +1,35 @@ +{ + "app": { + "signingConfigs": [], + "products": [ + { + "name": "default", + "signingConfig": "default", + "compatibleSdkVersion": "5.0.0(12)", + "runtimeOS": "HarmonyOS", + } + ], + "buildModeSet": [ + { + "name": "debug", + }, + { + "name": "release" + } + ] + }, + "modules": [ + { + "name": "entry", + "srcPath": "./entry", + "targets": [ + { + "name": "default", + "applyToProducts": [ + "default" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/entry/build-profile.json5 b/entry/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..197e83c1b9504b12a3837e0189185479662cad4b --- /dev/null +++ b/entry/build-profile.json5 @@ -0,0 +1,31 @@ +{ + "apiType": "stageMode", + "buildOption": { + "arkOptions": { + // "apPath": "./modules.ap" /* Profile used for profile-guided optimization (PGO), a compiler optimization technique to improve app runtime performance. */ + } + }, + "buildOptionSet": [ + { + "name": "release", + "arkOptions": { + "obfuscation": { + "ruleOptions": { + "enable": true, + "files": [ + "./obfuscation-rules.txt" + ] + } + } + } + }, + ], + "targets": [ + { + "name": "default" + }, + { + "name": "ohosTest", + } + ] +} \ No newline at end of file diff --git a/entry/hvigorfile.ts b/entry/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..c6edcd90486dd5a853cf7d34c8647f08414ca7a3 --- /dev/null +++ b/entry/hvigorfile.ts @@ -0,0 +1,6 @@ +import { hapTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins:[] /* Custom plugin to extend the functionality of Hvigor. */ +} diff --git a/entry/oh-package.json5 b/entry/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..248c3b7541a589682a250f86a6d3ecf7414d2d6a --- /dev/null +++ b/entry/oh-package.json5 @@ -0,0 +1,10 @@ +{ + "name": "entry", + "version": "1.0.0", + "description": "Please describe the basic information.", + "main": "", + "author": "", + "license": "", + "dependencies": {} +} + diff --git a/entry/src/main/ets/constants/CommonConstants.ets b/entry/src/main/ets/constants/CommonConstants.ets new file mode 100644 index 0000000000000000000000000000000000000000..c808affbfd946a7e90e1d6226c1119c7f090c976 --- /dev/null +++ b/entry/src/main/ets/constants/CommonConstants.ets @@ -0,0 +1,144 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Common constants for all features. + */ +export class CommonConstants { + /** + * Breakpoint sm. + */ + static readonly BREAK_POINT_SM: string = 'sm'; + + /** + * Breakpoint md. + */ + static readonly BREAK_POINT_MD: string = 'md'; + + /** + * Breakpoint lg. + */ + static readonly BREAK_POINT_LG: string = 'lg'; + + /** + * The break point value. + */ + static readonly BREAK_POINTS_VALUE: Array = ['300vp', '600vp', '840vp']; + + /** + * The number of columns for SM device. + */ + static readonly COLUMN_SM: number = 4; + + /** + * The number of columns for MD device. + */ + static readonly COLUMN_MD: number = 8; + + /** + * The number of columns for LG device. + */ + static readonly COLUMN_LG: number = 12; + + /** + * Tab adaptive padding sm. + */ + static readonly TAB_PADDING_SM: string = '18vp'; + + /** + * Tab adaptive padding md. + */ + static readonly TAB_PADDING_MD: string = '33vp'; + + /** + * Tab adaptive padding lg. + */ + static readonly TAB_PADDING_LG: string = '63vp'; + + /** + * Double tab adaptive padding sm. + */ + static readonly DOUBLE_TAB_PADDING_SM: string = '16vp'; + + /** + * Double tab adaptive padding md. + */ + static readonly DOUBLE_TAB_PADDING_MD1: string = '61vp'; + + /** + * Double tab adaptive padding lg. + */ + static readonly DOUBLE_TAB_PADDING_LG1: string = '71vp'; + + /** + * Double tab adaptive padding md. + */ + static readonly DOUBLE_TAB_PADDING_MD2: string = '70vp'; + + /** + * Double tab adaptive padding lg. + */ + static readonly DOUBLE_TAB_PADDING_LG2: string = '67vp'; + + /** + * The full percentage of component. + */ + static readonly FULL_WIDTH_PERCENT: string = '100%'; + + /** + * The ninety percent of the components. + */ + static readonly NINETY_PERCENT: string = '90%'; + + /** + * The eighty percent. + */ + static readonly EIGHTY_PERCENT: string = '80%'; + + /** + * The fifty percent. + */ + static readonly FIFTY_PERCENT: string = '50%'; + + /** + * Common font weight. + */ + static readonly FONT_WEIGHT_500: number = 500; + + /** + * Border radius. + */ + static readonly BORDER_RADIUS: number = 16; + + /** + * Common flexShrink and layoutWeight. + */ + static readonly COMMON_FAL_1: number = 1; + + /** + * Text font size. + */ + static readonly TEXT_FONT_SIZE: number = 10; + + /** + * Gray font flag. + */ + static readonly GRAY_FONT_FLAG: string = 'Gray'; + + /** + * Red font flag. + */ + static readonly RED_FONT_FLAG: string = 'Red'; +} \ No newline at end of file diff --git a/entry/src/main/ets/constants/ListDataConstants.ets b/entry/src/main/ets/constants/ListDataConstants.ets new file mode 100644 index 0000000000000000000000000000000000000000..68f34f9787497c4d77712084abcaa3ced548558d --- /dev/null +++ b/entry/src/main/ets/constants/ListDataConstants.ets @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * List data constants for all features. + */ +export class ListDataConstants { + /** + * Tab adaptive uri. + */ + static readonly TAB_ADAPTIVE_URI: string = 'pages/AdaptiveTabCenteringIndex'; + + /** + * Table adaptive uri. + */ + static readonly TABLE_ADAPTIVE_URI: string = 'pages/TableAdaptiveExtensionIndex'; + + /** + * Double tab adaptive uri. + */ + static readonly DOUBLE_TAB_ADAPTIVE_URI: string = 'pages/DoubleTabAdaptiveCenteringIndex'; + + /** + * Recommendation tab list. + */ + static readonly RECOMMENDATION_TAB_LIST: string[] = ['推荐', '7X24', '要闻', '日历', '关注', 'A股']; + + /** + * Recommendation tab list. + */ + static readonly RECOMMENDATION_TEST: string[] = + ['推荐', '7X24', '要闻', '日历', '关注', 'A股', '7X24', '要闻', '日历', '关注', 'A股']; + + /** + * Stock options tab list 1. + */ + static readonly STOCK_OPTIONS_LIST1: string[] = ['A股', '全球', 'B股', 'C股', 'E*F', '期货']; + + /** + * Stock options tab list 2. + */ + static readonly STOCK_OPTIONS_LIST2: string[] = ['大盘', '板块', '创业板', '科创板', '北交所']; + + /** + * Indicator name list. + */ + static readonly INDICATOR_NAME_LIST: string[] = ['指标名称', '某某长虹', '某某科技', '某某卫星']; + + /** + * Indicator name column. + */ + static readonly INDICATOR_NAME_COLUMN: string[] = ['核心指标', '所属行业', '最新股价(元)', '涨跌幅', '市盈率(TTM)']; + + /** + * Stock index data 1. + */ + static readonly STOCK_INDEX_DATA1: string[] = ['', '计算机', '19.86', '5.15%', '171.54']; + + /** + * Stock index data 2. + */ + static readonly STOCK_INDEX_DATA2: string[] = ['', '计算机', '19.86', '10.02%', '95.58']; + + /** + * Stock index data 3. + */ + static readonly STOCK_INDEX_DATA3: string[] = ['', '计算机', '19.86', '10.02%', '95.58']; +} \ No newline at end of file diff --git a/entry/src/main/ets/entryability/EntryAbility.ets b/entry/src/main/ets/entryability/EntryAbility.ets new file mode 100644 index 0000000000000000000000000000000000000000..6dc4e216a727aec21761c0200d30d7af0150e128 --- /dev/null +++ b/entry/src/main/ets/entryability/EntryAbility.ets @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AbilityConstant, UIAbility, Want } from '@kit.AbilityKit'; +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { window } from '@kit.ArkUI'; + +export default class EntryAbility extends UIAbility { + onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); + } + + onDestroy(): void { + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: window.WindowStage): void { + // Main window is created, set main page for this ability + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/Index', (err, data) => { + if (err.code) { + hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); + return; + } + hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? ''); + }); + } + + onWindowStageDestroy(): void { + // Main window is destroyed, release UI related resources + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground(): void { + // Ability has brought to foreground + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); + } + + onBackground(): void { + // Ability has back to background + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); + } +} diff --git a/entry/src/main/ets/pages/AdaptiveTabCenteringIndex.ets b/entry/src/main/ets/pages/AdaptiveTabCenteringIndex.ets new file mode 100644 index 0000000000000000000000000000000000000000..1b8673c9aeb6831970d9886a4906e726f21a6713 --- /dev/null +++ b/entry/src/main/ets/pages/AdaptiveTabCenteringIndex.ets @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { router } from '@kit.ArkUI'; +import { ListDataConstants } from '../constants/ListDataConstants'; +import { CommonConstants } from '../constants/CommonConstants'; +import { BreakpointType } from '../utils/BreakpointType'; + +@Entry +@Component +export struct AdaptiveTabCenteringIndex { + @StorageLink('breakPoint') breakPoint: string = CommonConstants.BREAK_POINT_SM; + @State tabIndexSelected: number = 0; + + build() { + Column() { + Row() { + Image($r('app.media.icon_back')) + .width($r('app.float.image_width')) + .height($r('app.float.image_height')) + .onClick(() => { + router.back(); + }) + } + .width(CommonConstants.FULL_WIDTH_PERCENT) + .margin({ + left: $r('app.float.back_margin_left'), + top: $r('app.float.back_margin_top') + }) + .justifyContent(FlexAlign.Start) + + Column() { + Row() { + Column() { + List({ + space: new BreakpointType(CommonConstants.TAB_PADDING_SM, CommonConstants.TAB_PADDING_MD, + CommonConstants.TAB_PADDING_LG).getValue(this.breakPoint) + }) { + ForEach(ListDataConstants.RECOMMENDATION_TAB_LIST, (item: string, index: number) => { + ListItem() { + Column() { + Text(item) + .fontSize($r('app.float.font_size_16')) + .fontWeight(CommonConstants.FONT_WEIGHT_500) + .fontColor(this.tabIndexSelected === index ? $r('app.color.red') : $r('app.color.black')) + .height($r('app.float.text_height')) + .focusable(true) + .groupDefaultFocus(index === 0 ? true : false) + } + } + .margin({ + top: $r('app.float.recommendation_margin_top'), + bottom: $r('app.float.recommendation_margin_bottom') + }) + .border({ + width: { + bottom: this.tabIndexSelected === index ? + $r('app.float.bottom_width_2') : $r('app.float.bottom_width_0') + }, + color: { + bottom: this.tabIndexSelected === index ? $r('app.color.red') : '' + }, + style: { + bottom: BorderStyle.Solid + } + }) + .onClick(() => { + this.tabIndexSelected = index; + }) + }, (item: string, index: number) => index + JSON.stringify(item)) + } + .scrollBar(BarState.Off) + .listDirection(Axis.Horizontal) + } + .width($r('app.float.width_296')) + .height($r('app.float.height_56')) + .backgroundColor($r('app.color.adaptive_tab_background')) + .justifyContent(FlexAlign.Center) + .alignItems(HorizontalAlign.Center) + .layoutWeight(CommonConstants.COMMON_FAL_1) + } + .height($r('app.float.height_56')) + .width(CommonConstants.FULL_WIDTH_PERCENT) + } + .height(CommonConstants.NINETY_PERCENT) + .justifyContent(FlexAlign.Center) + } + } +} \ No newline at end of file diff --git a/entry/src/main/ets/pages/DoubleTabAdaptiveCenteringIndex.ets b/entry/src/main/ets/pages/DoubleTabAdaptiveCenteringIndex.ets new file mode 100644 index 0000000000000000000000000000000000000000..f48fedd6e4f21cdf2345f3830107731322195e1a --- /dev/null +++ b/entry/src/main/ets/pages/DoubleTabAdaptiveCenteringIndex.ets @@ -0,0 +1,164 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { router } from '@kit.ArkUI'; +import { ListDataConstants } from '../constants/ListDataConstants'; +import { CommonConstants } from '../constants/CommonConstants'; +import { BreakpointType } from '../utils/BreakpointType'; + +@Entry +@Component +export struct AdaptiveTabCenteringIndex { + @StorageLink('breakPoint') breakPoint: string = CommonConstants.BREAK_POINT_SM; + @State tabIndexSelected: number = 0; + @State tabIndexSelected2: number = 0; + + build() { + Column() { + Row() { + Image($r('app.media.icon_back')) + .width($r('app.float.image_width')) + .height($r('app.float.image_height')) + .onClick(() => { + router.back(); + }) + } + .width(CommonConstants.FULL_WIDTH_PERCENT) + .margin({ + left: $r('app.float.back_margin_left'), + top: $r('app.float.back_margin_top') + }) + .justifyContent(FlexAlign.Start) + + Column() { + Row() { + Column() { + List({ + space: new BreakpointType(CommonConstants.DOUBLE_TAB_PADDING_SM, CommonConstants.DOUBLE_TAB_PADDING_MD1, + CommonConstants.DOUBLE_TAB_PADDING_LG1).getValue(this.breakPoint) + }) { + ForEach(ListDataConstants.STOCK_OPTIONS_LIST1, (item: string, index: number) => { + ListItem() { + Column() { + Text(item) + .fontSize($r('app.float.font_size_16')) + .fontWeight(CommonConstants.FONT_WEIGHT_500) + .fontColor(this.tabIndexSelected === index ? $r('app.color.red') : $r('app.color.black')) + .height($r('app.float.text_height')) + .width($r('app.float.text_width')) + .focusable(true) + .groupDefaultFocus(index === 0 ? true : false) + } + } + .margin({ top: $r('app.float.stock_options_margin') }) + .border({ + width: { + bottom: this.tabIndexSelected === index ? + $r('app.float.bottom_width_2') : $r('app.float.bottom_width_0') + }, + color: { + bottom: this.tabIndexSelected === index ? $r('app.color.red') : '' + }, + style: { + bottom: BorderStyle.Solid + } + }) + .onClick(() => { + this.tabIndexSelected = index; + }) + }, (item: string, index: number) => index + JSON.stringify(item)) + + ListItem() { + Image($r('app.media.ic_public_more')) + .width($r('app.float.image_width')) + .height($r('app.float.image_height')) + } + .margin({ top: $r('app.float.more_margin_top') }) + .visibility(this.breakPoint === CommonConstants.BREAK_POINT_LG ? Visibility.Visible : Visibility.Hidden) + } + .scrollBar(BarState.Off) + .listDirection(Axis.Horizontal) + } + .width($r('app.float.width_296')) + .height($r('app.float.height_56')) + .margin({ left: $r('app.float.stock_column_margin') }) + .justifyContent(FlexAlign.Center) + .alignItems(HorizontalAlign.Center) + .layoutWeight(CommonConstants.COMMON_FAL_1) + + Image($r('app.media.ic_public_more')) + .width($r('app.float.image_width')) + .height($r('app.float.image_height')) + .margin({ + left: $r('app.float.more_margin_left'), + right: $r('app.float.more_margin_right') + }) + .visibility(this.breakPoint === CommonConstants.BREAK_POINT_LG ? Visibility.Hidden : Visibility.Visible) + } + .height($r('app.float.height_56')) + .width(CommonConstants.FULL_WIDTH_PERCENT) + + Row() { + Column() { + List({ + space: new BreakpointType(CommonConstants.DOUBLE_TAB_PADDING_SM, CommonConstants.DOUBLE_TAB_PADDING_MD2, + CommonConstants.DOUBLE_TAB_PADDING_LG2).getValue(this.breakPoint) + }) { + ForEach(ListDataConstants.STOCK_OPTIONS_LIST2, (item: string, index: number) => { + ListItem() { + Column() { + Text(item) + .fontSize($r('app.float.font_size_14')) + .fontWeight(CommonConstants.FONT_WEIGHT_500) + .fontColor( + this.tabIndexSelected2 === index ? $r('app.color.selected_text_color') : $r('app.color.black') + ) + .margin({ + top: $r('app.float.text_margin_top_and_bottom'), + bottom: $r('app.float.text_margin_top_and_bottom'), + left: $r('app.float.text_margin_left_and_right'), + right: $r('app.float.text_margin_left_and_right') + }) + .textAlign(TextAlign.Center) + .focusable(true) + .groupDefaultFocus(index === 0 ? true : false) + } + } + .backgroundColor( + this.tabIndexSelected2 === index ? $r('app.color.selected_text_background') : $r('app.color.text_background') + ) + .border({ radius: CommonConstants.BORDER_RADIUS }) + .onClick(() => { + this.tabIndexSelected2 = index; + }) + }, (item: string, index: number) => index + JSON.stringify(item)) + } + .scrollBar(BarState.Off) + .listDirection(Axis.Horizontal) + } + .width($r('app.float.width_296')) + .height($r('app.float.height_56')) + .justifyContent(FlexAlign.Center) + .alignItems(HorizontalAlign.Center) + .layoutWeight(CommonConstants.COMMON_FAL_1) + } + .height($r('app.float.height_56')) + .width(CommonConstants.FULL_WIDTH_PERCENT) + } + .height(CommonConstants.NINETY_PERCENT) + .justifyContent(FlexAlign.Center) + } + } +} \ No newline at end of file diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets new file mode 100644 index 0000000000000000000000000000000000000000..eadf6d2e4fd64c7d4585b1e5f8c33e3fef8b7b79 --- /dev/null +++ b/entry/src/main/ets/pages/Index.ets @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { router } from '@kit.ArkUI'; +import { CommonConstants } from '../constants/CommonConstants'; +import { ListDataConstants } from '../constants/ListDataConstants'; + +class DirectoryItem { + title: ResourceStr = ''; + uri: string = ''; + id: string = ''; +} + +@Entry +@Component +struct Index { + @StorageLink('breakPoint') breakPoint: string = CommonConstants.BREAK_POINT_SM; + private title: string | Resource = $r('app.string.title'); + private directory: DirectoryItem[] = [ + { + title: $r('app.string.tab_adaptive'), + uri: ListDataConstants.TAB_ADAPTIVE_URI, + id: 'AdaptiveTabCenteringIndex' + }, + { + title: $r('app.string.table_adaptive'), + uri: ListDataConstants.TABLE_ADAPTIVE_URI, + id: 'TableAdaptiveExtensionIndex' + }, + { + title: $r('app.string.double_tab_adaptive'), + uri: ListDataConstants.DOUBLE_TAB_ADAPTIVE_URI, + id: 'DoubleTabAdaptiveCenteringIndex' + } + ]; + + build() { + GridRow({ + breakpoints: { + value: CommonConstants.BREAK_POINTS_VALUE, + reference: BreakpointsReference.WindowSize + }, + columns: { + sm: CommonConstants.COLUMN_SM, + md: CommonConstants.COLUMN_MD, + lg: CommonConstants.COLUMN_LG + }, + direction: GridRowDirection.Row + }) { + GridCol({ + span: { + sm: CommonConstants.COLUMN_SM, + md: CommonConstants.COLUMN_MD, + lg: CommonConstants.COLUMN_LG + } + }) { + Column() { + Navigation() { + Column() { + Text(this.title) + + ForEach(this.directory, (item: DirectoryItem) => { + Button(item.title) + .id(item.id) + .fontSize($r('app.float.font_size')) + .width(CommonConstants.NINETY_PERCENT) + .height($r('app.float.button_height')) + .margin($r('app.float.button_margin')) + .backgroundColor($r('app.color.button_background')) + .onClick(() => { + router.pushUrl({ + url: item.uri + }); + }) + }, (item: DirectoryItem) => JSON.stringify(item)) + } + .width(CommonConstants.FULL_WIDTH_PERCENT) + } + .mode(NavigationMode.Stack) + .hideBackButton(true) + .titleMode(NavigationTitleMode.Mini) + .title(this.title) + } + } + } + .onBreakpointChange((breakpoints: string) => { + this.breakPoint = breakpoints; + }) + } +} \ No newline at end of file diff --git a/entry/src/main/ets/pages/TableAdaptiveExtensionIndex.ets b/entry/src/main/ets/pages/TableAdaptiveExtensionIndex.ets new file mode 100644 index 0000000000000000000000000000000000000000..3d4e6b2dbaf249f30ce45eb4f2824634611fdbcd --- /dev/null +++ b/entry/src/main/ets/pages/TableAdaptiveExtensionIndex.ets @@ -0,0 +1,166 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { router } from '@kit.ArkUI'; +import { ListDataConstants } from '../constants/ListDataConstants'; +import { CommonConstants } from '../constants/CommonConstants'; + +@Entry +@Component +export struct AdaptiveTabCenteringIndex { + @StorageLink('breakPoint') breakPoint: string = CommonConstants.BREAK_POINT_SM; + @State tabIndexSelected: number = 0; + + @Builder + Item(item: string, index: number, color: string) { + Row() { + Text(item) + .fontSize($r('app.float.font_size_14')) + .fontWeight(CommonConstants.FONT_WEIGHT_500) + .fontColor(color === CommonConstants.GRAY_FONT_FLAG ? (index > 0 ? Color.Gray : Color.Black) : + ((index === 2 || index === 3) ? Color.Red : Color.Black)) + .height($r('app.float.text_height')) + } + .flexShrink(CommonConstants.COMMON_FAL_1) + } + + build() { + Column() { + Row() { + Image($r('app.media.icon_back')) + .width($r('app.float.image_width')) + .height($r('app.float.image_height')) + .onClick(() => { + router.back(); + }) + } + .width(CommonConstants.FULL_WIDTH_PERCENT) + .margin({ + left: $r('app.float.back_margin_left'), + top: $r('app.float.back_margin_top') + }) + .justifyContent(FlexAlign.Start) + + Row() { + if (this.breakPoint === CommonConstants.BREAK_POINT_LG) { + Column() { + // Left Placeholder Area + } + .width(CommonConstants.FIFTY_PERCENT) + .height(CommonConstants.FULL_WIDTH_PERCENT) + .border({ + width: { right: 1 }, + color: { right: Color.Gray }, + style: { right: BorderStyle.Solid } + }) + } + Column() { + Row() { + Column() { + Row() { + ForEach(ListDataConstants.INDICATOR_NAME_LIST, (item: string, index: number) => { + Column() { + Row() { + Text(item) + .fontSize($r('app.float.font_size_14')) + .fontWeight(CommonConstants.FONT_WEIGHT_500) + .fontColor(Color.Black) + .height($r('app.float.text_height')) + Image(index > 0 ? $r('app.media.ic_public_right') : $r('app.media.ic_public_info')) + .width($r('app.float.icon_size')) + .height($r('app.float.icon_size')) + } + + if (index > 0) { + Text('60**39') + .fontSize(CommonConstants.TEXT_FONT_SIZE) + .fontWeight(CommonConstants.FONT_WEIGHT_500) + .fontColor($r('app.color.text_font_color')) + .height($r('app.float.text_height')) + } + } + .flexShrink(CommonConstants.COMMON_FAL_1) + .width(index === 0 ? $r('app.float.indicator_name_width') : 'auto') + .alignItems(HorizontalAlign.Start) + + if (index < 3) { + Blank() + } + + }, (item: string, index: number) => index + JSON.stringify(item)) + } + .height($r('app.float.indicator_name_height')) + .width(CommonConstants.FULL_WIDTH_PERCENT) + .justifyContent(FlexAlign.SpaceBetween) + + Divider() + .color($r('app.color.text_font_color')) + + Row() { + Column() { + ForEach(ListDataConstants.INDICATOR_NAME_COLUMN, (item: string, index: number) => { + this.Item(item, index, CommonConstants.GRAY_FONT_FLAG) + }, (item: string, index: number) => index + JSON.stringify(item)) + } + .alignItems(HorizontalAlign.Start) + + Blank() + + Column() { + ForEach(ListDataConstants.STOCK_INDEX_DATA1, (item: string, index: number) => { + this.Item(item, index, CommonConstants.RED_FONT_FLAG) + }, (item: string, index: number) => index + JSON.stringify(item)) + } + .width($r('app.float.stock_data_width')) + .alignItems(HorizontalAlign.End) + + Blank() + + Column() { + ForEach(ListDataConstants.STOCK_INDEX_DATA2, (item: string, index: number) => { + this.Item(item, index, CommonConstants.RED_FONT_FLAG) + }, (item: string, index: number) => index + JSON.stringify(item)) + } + .width($r('app.float.stock_data_width')) + .alignItems(HorizontalAlign.End) + + Blank() + + Column() { + ForEach(ListDataConstants.STOCK_INDEX_DATA3, (item: string, index: number) => { + this.Item(item, index, CommonConstants.RED_FONT_FLAG) + }, (item: string, index: number) => index + JSON.stringify(item)) + } + .width($r('app.float.stock_data_width')) + .alignItems(HorizontalAlign.End) + } + .width(CommonConstants.FULL_WIDTH_PERCENT) + .margin({ top: $r('app.float.indicator_name_margin') }) + } + } + } + .height(CommonConstants.EIGHTY_PERCENT) + .width(this.breakPoint === CommonConstants.BREAK_POINT_LG ? + CommonConstants.FIFTY_PERCENT : CommonConstants.FULL_WIDTH_PERCENT) + .justifyContent(this.breakPoint === CommonConstants.BREAK_POINT_LG ? FlexAlign.End : FlexAlign.Center) + .padding({ + left: $r('app.float.stock_data_margin'), + right: $r('app.float.stock_data_margin') + }) + } + .width(CommonConstants.FULL_WIDTH_PERCENT) + } + } +} \ No newline at end of file diff --git a/entry/src/main/ets/utils/BreakpointType.ets b/entry/src/main/ets/utils/BreakpointType.ets new file mode 100644 index 0000000000000000000000000000000000000000..df1647a0ba181cc12f7abfc42e0201a0827f8654 --- /dev/null +++ b/entry/src/main/ets/utils/BreakpointType.ets @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export class BreakpointType { + sm: T; + md: T; + lg: T; + + constructor(sm: T, md: T, lg: T) { + this.sm = sm; + this.md = md; + this.lg = lg; + } + + getValue(currentBreakpoint: string): T { + if (currentBreakpoint === 'md') { + return this.md; + } + if (currentBreakpoint === 'lg') { + return this.lg; + } else { + return this.sm; + } + } +} \ No newline at end of file diff --git a/entry/src/main/ets/utils/Logger.ets b/entry/src/main/ets/utils/Logger.ets new file mode 100644 index 0000000000000000000000000000000000000000..dfe8fcc155419eb67f401ac8624b0517cf74ae7a --- /dev/null +++ b/entry/src/main/ets/utils/Logger.ets @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { hilog } from '@kit.PerformanceAnalysisKit'; + +class Logger { + private domain: number; + private prefix: string; + private format: string = '%{public}s, %{public}s'; + + constructor(prefix: string) { + this.prefix = prefix; + this.domain = 0xFF00; + } + + debug(...args: string[]) { + hilog.debug(this.domain, this.prefix, this.format, args); + } + + info(...args: string[]) { + hilog.info(this.domain, this.prefix, this.format, args); + } + + warn(...args: string[]) { + hilog.warn(this.domain, this.prefix, this.format, args); + } + + error(...args: string[]) { + hilog.error(this.domain, this.prefix, this.format, args); + } +} + +export default new Logger('[MultiTicketClass]'); \ No newline at end of file diff --git a/entry/src/main/module.json5 b/entry/src/main/module.json5 new file mode 100644 index 0000000000000000000000000000000000000000..6c07d9d8839ac9716809c6e06c21805d52c138fe --- /dev/null +++ b/entry/src/main/module.json5 @@ -0,0 +1,38 @@ +{ + "module": { + "name": "entry", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": [ + "phone", + "tablet", + "2in1" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "abilities": [ + { + "name": "EntryAbility", + "srcEntry": "./ets/entryability/EntryAbility.ets", + "description": "$string:EntryAbility_desc", + "icon": "$media:icon", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:startIcon", + "startWindowBackground": "$color:start_window_background", + "exported": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ] + } + ] + } +} \ No newline at end of file diff --git a/entry/src/main/resources/base/element/color.json b/entry/src/main/resources/base/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..2fce1f8218523b440aa7aa36fd5bae96191748f8 --- /dev/null +++ b/entry/src/main/resources/base/element/color.json @@ -0,0 +1,40 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + }, + { + "name": "adaptive_tab_background", + "value": "#1AFFFFFF" + }, + { + "name": "text_font_color", + "value": "#66000000" + }, + { + "name": "selected_text_background", + "value": "#0df12c33" + }, + { + "name": "text_background", + "value": "#FFFFFF" + }, + { + "name": "selected_text_color", + "value": "#F12C33" + }, + { + "name": "button_background", + "value": "#007DFF" + }, + { + "name": "red", + "value": "#E53137" + }, + { + "name": "black", + "value": "#000000" + } + ] +} \ No newline at end of file diff --git a/entry/src/main/resources/base/element/float.json b/entry/src/main/resources/base/element/float.json new file mode 100644 index 0000000000000000000000000000000000000000..b60b067ed2bd788dbd78695dd33d41e221cc40d4 --- /dev/null +++ b/entry/src/main/resources/base/element/float.json @@ -0,0 +1,124 @@ +{ + "float": [ + { + "name": "font_size", + "value": "20fp" + }, + { + "name": "button_height", + "value": "55vp" + }, + { + "name": "button_margin", + "value": "12vp" + }, + { + "name": "image_height", + "value": "24vp" + }, + { + "name": "image_width", + "value": "24vp" + }, + { + "name": "back_margin_left", + "value": "12vp" + }, + { + "name": "back_margin_top", + "value": "24vp" + }, + { + "name": "font_size_16", + "value": "16fp" + }, + { + "name": "font_size_14", + "value": "14fp" + }, + { + "name": "icon_size", + "value": "16vp" + }, + { + "name": "stock_data_width", + "value": "56vp" + }, + { + "name": "stock_data_margin", + "value": "10vp" + }, + { + "name": "text_height", + "value": "21vp" + }, + { + "name": "text_width", + "value": "32vp" + }, + { + "name": "height_56", + "value": "56vp" + }, + { + "name": "width_296", + "value": "296vp" + }, + { + "name": "bottom_width_2", + "value": "2vp" + }, + { + "name": "bottom_width_0", + "value": "0vp" + }, + { + "name": "text_margin_left_and_right", + "value": "14vp" + }, + { + "name": "text_margin_top_and_bottom", + "value": "5vp" + }, + { + "name": "indicator_name_width", + "value": "99vp" + }, + { + "name": "indicator_name_height", + "value": "48vp" + }, + { + "name": "indicator_name_margin", + "value": "12vp" + }, + { + "name": "stock_options_margin", + "value": "18vp" + }, + { + "name": "more_margin_top", + "value": "15vp" + }, + { + "name": "more_margin_left", + "value": "16vp" + }, + { + "name": "more_margin_right", + "value": "24vp" + }, + { + "name": "stock_column_margin", + "value": "16vp" + }, + { + "name": "recommendation_margin_top", + "value": "18vp" + }, + { + "name": "recommendation_margin_bottom", + "value": "13vp" + } + ] +} \ 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 new file mode 100644 index 0000000000000000000000000000000000000000..55984e59d4d23087d6c7aa4a0c7dc74b4dde65e0 --- /dev/null +++ b/entry/src/main/resources/base/element/string.json @@ -0,0 +1,32 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "MultiTicketClass" + }, + { + "name": "title", + "value": "一多股票类的关键场景实现" + }, + { + "name": "tab_adaptive", + "value": "tab自适应居中" + }, + { + "name": "table_adaptive", + "value": "表格自适应延伸" + }, + { + "name": "double_tab_adaptive", + "value": "双tab自适应居中" + } + ] +} \ No newline at end of file diff --git a/entry/src/main/resources/base/media/ic_public_info.png b/entry/src/main/resources/base/media/ic_public_info.png new file mode 100644 index 0000000000000000000000000000000000000000..9d50cc007b1d1245e3e8af8abe86956213275623 Binary files /dev/null and b/entry/src/main/resources/base/media/ic_public_info.png differ diff --git a/entry/src/main/resources/base/media/ic_public_more.png b/entry/src/main/resources/base/media/ic_public_more.png new file mode 100644 index 0000000000000000000000000000000000000000..e610aabe9b23249a2490622dd1b2804bb83ba328 Binary files /dev/null and b/entry/src/main/resources/base/media/ic_public_more.png differ diff --git a/entry/src/main/resources/base/media/ic_public_right.png b/entry/src/main/resources/base/media/ic_public_right.png new file mode 100644 index 0000000000000000000000000000000000000000..489e1109334751f60b66a036df613d2895dd5281 Binary files /dev/null and b/entry/src/main/resources/base/media/ic_public_right.png differ diff --git a/entry/src/main/resources/base/media/icon.png b/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..cd45accb1dfd2fd0da16c732c72faa6e46b26521 Binary files /dev/null and b/entry/src/main/resources/base/media/icon.png differ diff --git a/entry/src/main/resources/base/media/icon_back.png b/entry/src/main/resources/base/media/icon_back.png new file mode 100644 index 0000000000000000000000000000000000000000..744c4cfa740ab0d07130eda0b11629318b3b8e30 Binary files /dev/null and b/entry/src/main/resources/base/media/icon_back.png differ diff --git a/entry/src/main/resources/base/media/startIcon.png b/entry/src/main/resources/base/media/startIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..366f76459ffd4494ec40d0ddd5c59385b9c5da11 Binary files /dev/null and b/entry/src/main/resources/base/media/startIcon.png differ diff --git a/entry/src/main/resources/base/profile/main_pages.json b/entry/src/main/resources/base/profile/main_pages.json new file mode 100644 index 0000000000000000000000000000000000000000..c9c0e0fdd532877e222784a01e5b83f5cfd99165 --- /dev/null +++ b/entry/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,8 @@ +{ + "src": [ + "pages/Index", + "pages/AdaptiveTabCenteringIndex", + "pages/TableAdaptiveExtensionIndex", + "pages/DoubleTabAdaptiveCenteringIndex" + ] +} diff --git a/entry/src/main/resources/en_US/element/string.json b/entry/src/main/resources/en_US/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..75138fc0f5927be9c93a2892505db6987819e0ae --- /dev/null +++ b/entry/src/main/resources/en_US/element/string.json @@ -0,0 +1,32 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "MultiTicketClass" + }, + { + "name": "title", + "value": "Key Scenario Implementation of a Multi-Stock Class" + }, + { + "name": "tab_adaptive", + "value": "Adaptive tab centering" + }, + { + "name": "table_adaptive", + "value": "Table Adaptive Stretch" + }, + { + "name": "double_tab_adaptive", + "value": "Double tab adaptive centering" + } + ] +} \ 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 new file mode 100644 index 0000000000000000000000000000000000000000..3e8a40277b5edf7401cb7b1d087b341ded9bb525 --- /dev/null +++ b/entry/src/main/resources/zh_CN/element/string.json @@ -0,0 +1,32 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "模块描述" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "MultiTicketClass" + }, + { + "name": "title", + "value": "一多股票类的关键场景实现" + }, + { + "name": "tab_adaptive", + "value": "tab自适应居中" + }, + { + "name": "table_adaptive", + "value": "表格自适应延伸" + }, + { + "name": "double_tab_adaptive", + "value": "双tab自适应居中" + } + ] +} \ No newline at end of file diff --git a/hvigor/hvigor-config.json5 b/hvigor/hvigor-config.json5 new file mode 100644 index 0000000000000000000000000000000000000000..73bfab4e997c8d4aea53b22fdd7f10112b30987f --- /dev/null +++ b/hvigor/hvigor-config.json5 @@ -0,0 +1,17 @@ +{ + "modelVersion": "5.0.0", + "dependencies": { + }, + "execution": { + // "daemon": true, /* Enable daemon compilation. Default: true */ + // "incremental": true, /* Enable incremental compilation. Default: true */ + // "parallel": true, /* Enable parallel compilation. Default: true */ + // "typeCheck": false, /* Enable typeCheck. Default: false */ + }, + "logging": { + // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */ + }, + "debugging": { + // "stacktrace": false /* Disable stacktrace compilation. Default: false */ + } +} \ No newline at end of file diff --git a/hvigorfile.ts b/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..f3cb9f1a87a81687554a76283af8df27d8bda775 --- /dev/null +++ b/hvigorfile.ts @@ -0,0 +1,6 @@ +import { appTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins:[] /* Custom plugin to extend the functionality of Hvigor. */ +} diff --git a/oh-package.json5 b/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..9927a322927f4632cc8b5c95825f1fc7cb032d8b --- /dev/null +++ b/oh-package.json5 @@ -0,0 +1,14 @@ +{ + "modelVersion": "5.0.0", + "name": "myapplication", + "version": "1.0.0", + "description": "Please describe the basic information.", + "main": "", + "author": "", + "license": "", + "dependencies": { + }, + "devDependencies": { + "@ohos/hypium": "1.0.15" + } +} \ No newline at end of file diff --git a/screenshots/Devices/image1.png b/screenshots/Devices/image1.png new file mode 100644 index 0000000000000000000000000000000000000000..8e35db5d9dd56d7f85f03cc7a7abbaa4c36abfc8 Binary files /dev/null and b/screenshots/Devices/image1.png differ diff --git a/screenshots/Devices/image2.png b/screenshots/Devices/image2.png new file mode 100644 index 0000000000000000000000000000000000000000..b7d4e597fadcc8f01bde7c080c7b6ae6b459675f Binary files /dev/null and b/screenshots/Devices/image2.png differ diff --git a/screenshots/Devices/image3.png b/screenshots/Devices/image3.png new file mode 100644 index 0000000000000000000000000000000000000000..5503aef0f591fe676c7e0ebf9b8d0baf6e6e2b85 Binary files /dev/null and b/screenshots/Devices/image3.png differ diff --git a/screenshots/Devices/image4.png b/screenshots/Devices/image4.png new file mode 100644 index 0000000000000000000000000000000000000000..f4af4e3570e3f1ab382f3cfc3d0c328609f79864 Binary files /dev/null and b/screenshots/Devices/image4.png differ diff --git a/screenshots/Devices/image5.png b/screenshots/Devices/image5.png new file mode 100644 index 0000000000000000000000000000000000000000..6c96d6795214d340c5ccece5f575b918d0678851 Binary files /dev/null and b/screenshots/Devices/image5.png differ diff --git a/screenshots/Devices/image6.png b/screenshots/Devices/image6.png new file mode 100644 index 0000000000000000000000000000000000000000..94cfa92d9f469450fdac66494a0b0c51d12cab9e Binary files /dev/null and b/screenshots/Devices/image6.png differ diff --git a/screenshots/Devices/image7.png b/screenshots/Devices/image7.png new file mode 100644 index 0000000000000000000000000000000000000000..16e7e556888c8d7797b97e5a38999692e1462777 Binary files /dev/null and b/screenshots/Devices/image7.png differ diff --git a/screenshots/Devices/image8.png b/screenshots/Devices/image8.png new file mode 100644 index 0000000000000000000000000000000000000000..7091aa2c925d98b98cc16c2453d53a637e4ceb24 Binary files /dev/null and b/screenshots/Devices/image8.png differ diff --git a/screenshots/Devices/image9.png b/screenshots/Devices/image9.png new file mode 100644 index 0000000000000000000000000000000000000000..b698afd04ee90e15f4ab259935893975241641f9 Binary files /dev/null and b/screenshots/Devices/image9.png differ