!354 add TV-adaptation

Merge pull request !354 from Boeyyaa/master
This commit is contained in:
openharmony_ci 2024-07-19 09:57:27 +00:00 committed by Gitee
commit 0235a1c477
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
50 changed files with 1984 additions and 0 deletions

View File

@ -0,0 +1,12 @@
*.iml
build/
/.idea
/.gradle
local.properties
*.DS_Store
tsconfig.json
node_modules
.hvigor
package-lock.json
oh_modules
oh-package-lock.json5

View File

@ -0,0 +1,81 @@
# OpenHarmony-TV端视频播放器的研究及开发
## 简介
本系统是一个综合性的多媒体播放平台,为用户提供了丰富的电视剧、电影和音乐播放功能,同时支持个性化的收藏和管理服务。
- **电视剧播放**
- 此功能允许用户观看存储在系统内的各种电视剧集。
- 支持多集连续播放或单集点播。
- 提供剧集详情、演员阵容、剧情介绍等信息。
- 支持多种视频质量选择,如高清、超清等。
- 提供播放控制,如暂停、快进、快退、音量调节等。
- 支持弹幕、评论、评分等社交互动。
![](./figures/picture1.png)
- **电影播放**
- 此功能允许用户观看系统内的电影资源。
- 提供电影详情、演员阵容、剧情简介等信息。
- 支持多种视频质量选择。
- 提供字幕选择,支持多语言字幕。
- 提供播放控制、评论、评分等。
- 可能支持电影推荐和分类浏览。
![](./figures/picture2.png)
- **音乐播放**
- 此功能允许用户收听系统内的音乐内容。
- 支持在线播放和离线下载。
- 提供歌曲详情、歌手信息、歌词显示等。
- 支持多种音乐品质选择。
- 提供播放控制,如播放/暂停、上一曲/下一曲、循环播放等。
- 可能支持歌单、专辑、歌手分类浏览。
![](./figures/picture3.png)
- **个人中心**
- 显示用户的账户信息,如用户名、头像、会员状态等。
- 可能支持设置功能,如更改密码、调整播放设置等。
- 提供消息通知,如新内容推荐、活动通知等。
![](./figures/picture4.png)
- **随机播放**
- 此功能允许用户随机播放系统内的电视剧、电影或音乐内容。
- 提供随机播放选项,用户可以选择随机播放电视剧、电影或音乐。
- 系统会随机选择一部内容开始播放。
- 支持在特定分类或收藏夹中进行随机播放。
- 提供停止随机播放和继续当前播放的选项。
![](./figures/picture5.png)
## 目录
### 目录结构
```
/vendor_unionman_2/unionpi_tiger/sample_hzu/TV-adaptation
├── figures
├── hvigor
├── product
│ └── phone
│ └── src
│ └── main
│ ├── ets
│ ├── resources
├── .gitignore
├── build-profile.json5
├── hvigorfile.js
├── hvigorw
├── hvigorw.bat
├── oh-package.json5
├── README_zh.md
```
## 约束
- 开发环境
- **DevEco Studio for OpenHarmony**: 版本号大于3.0.0.900下载安装OpenHarmony SDK API Version 9。初始的IDE配置可以参考IDE的使用文档
- 建议
- 推荐使用本工程下的launcher.p7b文件路径signature/launcher.p7b
### 代码下载
1. git clone https://gitee.com/boeyyaa/vendor_unionman_2.git
2. 通过下载zip的方式直接下载

View File

@ -0,0 +1,173 @@
/*
* Copyright (c) 2020-2023 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.
*/
{
"app": {
"products": [
{
"name": "default",
"signingConfig": "default",
"compileSdkVersion": 10,
"compatibleSdkVersion": 9
}
],
"signingConfigs": [],
},
"modules": [
{
"name": "launcher_common",
"srcPath": "./common",
"targets": [
{
"name": "default",
"applyToProducts": [
"default",
],
},
],
},
{
"name": "launcher_appcenter",
"srcPath": "./feature/appcenter",
"targets": [
{
"name": "default",
"applyToProducts": [
"default",
],
},
],
},
{
"name": "launcher_bigfolder",
"srcPath": "./feature/bigfolder",
"targets": [
{
"name": "default",
"applyToProducts": [
"default",
],
},
],
},
{
"name": "launcher_form",
"srcPath": "./feature/form",
"targets": [
{
"name": "default",
"applyToProducts": [
"default",
],
},
],
},
{
"name": "launcher_gesturenavigation",
"srcPath": "./feature/gesturenavigation",
"targets": [
{
"name": "default",
"applyToProducts": [
"default",
],
},
],
},
{
"name": "launcher_numbadge",
"srcPath": "./feature/numbadge",
"targets": [
{
"name": "default",
"applyToProducts": [
"default",
],
},
],
},
{
"name": "launcher_pagedesktop",
"srcPath": "./feature/pagedesktop",
"targets": [
{
"name": "default",
"applyToProducts": [
"default",
],
},
],
},
{
"name": "launcher_recents",
"srcPath": "./feature/recents",
"targets": [
{
"name": "default",
"applyToProducts": [
"default",
],
},
],
},
{
"name": "launcher_smartDock",
"srcPath": "./feature/smartdock",
"targets": [
{
"name": "default",
"applyToProducts": [
"default",
],
},
],
},
{
"name": "phone_launcher",
"srcPath": "./product/phone",
"targets": [
{
"name": "default",
"applyToProducts": [
"default",
],
},
],
},
{
"name": "pad_launcher",
"srcPath": "./product/pad",
"targets": [
{
"name": "default",
"applyToProducts": [
"default",
],
},
],
},
{
"name": "launcher_settings",
"srcPath": "./feature/settings",
"targets": [
{
"name": "default",
"applyToProducts": [
"default",
],
},
],
}
],
}

View File

@ -0,0 +1,24 @@
/*
* Copyright (c) 2020-2023 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.
*/
{
"apiType": 'stageMode',
"buildOption": {
},
"targets": [
{
"name": "default",
}
]
}

View File

@ -0,0 +1,17 @@
/**
* Copyright (c) 2022 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.
*/
// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
module.exports = require('@ohos/hvigor-ohos-plugin').hapTasks

View File

@ -0,0 +1,16 @@
{
"devDependencies": {},
"name": "launcher",
"description": "",
"version": "1.0.0",
"dependencies": {
"@ohos/pagedesktop": "../../feature/pagedesktop",
"@ohos/recents": "../../feature/recents",
"@ohos/bigfolder": "../../feature/bigfolder",
"@ohos/smartdock": "../../feature/smartdock",
"@ohos/form": "../../feature/form",
"@ohos/gesturenavigation": "../../feature/gesturenavigation",
"@ohos/common": "../../common",
"@ohos/numbadge": "../../feature/numbadge"
}
}

View File

@ -0,0 +1,27 @@
/**
* Copyright (c) 2021-2022 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 { Log } from '@ohos/common';
const TAG = 'EmptyPage';
@Entry
@Component
struct EmptyPage {
aboutToAppear(): void {
Log.showInfo(TAG, 'aboutToAppear');
}
build() {}
}

View File

@ -0,0 +1,262 @@
import prompt from '@ohos.prompt';
import bundle from '@ohos.bundle';
import innerBundleManager from '@ohos.bundle.innerBundleManager';
import account_osAccount from '@ohos.account.osAccount';
import { KeyCode } from '@ohos.multimodalInput.keyCode'
import StyleConstants from '../common/constants/StyleConstants';
import { AppItem } from '../common/Appitem'
import { localEventManager } from '@ohos/common';
import { EventConstants } from '@ohos/common';
import display from '@ohos.display';
import router from '@ohos.router';
@Entry
@Component
struct Index {
@State message: string = 'Hello World';
@State appLabel: string[] = [];
@State errorappLabel: string[] = [];
@State appIcon: PixelMap[] = [];
@State onKeyIndex: number = 0;
@State pages: number[] = [];
//屏幕宽高
private screenHeight;
private screenWidth;
//不显示的应用
private noShowBundleName = ['com.ohos.adminprovisioning', 'com.ohos.contacts'];
private noShowAbilityName = ['com.ohos.adminprovisioning.MainAbility', 'com.ohos.contacts.MainAbility'];
private pageItem = Array.from({ length: 12 }, (_, i) => i + 1);
private deviceId: number = 100;
private appItemInfos: any[] = [];
private useID: number = 100;
private bundleName: string[] = [];
private abilityName: string[] = [];
private appSize: number = 250;
private swiperController: SwiperController = new SwiperController();
private readonly mLauncherAbilityChangeListeners: any[] = [];
private readonly mInstallationListener;
private noToShowApp(bundleName,abilityName){
for(let i=0;i<this.noShowBundleName.length;i++){
if(bundleName == this.noShowBundleName[i]&&abilityName==this.noShowAbilityName[i]){
return true;
}
}
return false;
};
private readonly mBundleStatusCallback: any = {
add: (bundleName, userId) => {
this.updateScreenInfo()
},
remove: (bundleName, userId) => {
this.updateScreenInfo()
},
update: (bundleName, userId) => {
this.updateScreenInfo()
}
};
onPageHide() {
this.message = 'onPageHide'
}
onPageShow() {
this.message = 'onPageShow'
}
private updateScreenInfo(): void {
console.debug('updateScreenInfo');
globalThis.SmartDockStyleConfig.initConfig();
}
async aboutToAppear() {
//初始化useId
const accountManager = account_osAccount.getAccountManager();
await accountManager.getOsAccountLocalIdFromProcess().then((accountID) => {
this.useID = accountID;
console.log('getOsAccountLocalIdFromProcess, accountID: ' + accountID);
}).catch((err) => {
console.log('getOsAccountLocalIdFromProcess err: ' + JSON.stringify(err));
});
//得到所有应用信息
let abilityList = null;
await innerBundleManager.getAllLauncherAbilityInfos(this.useID)
.then((res) => {
abilityList = res;
})
.catch((err) => {
console.error(`getLauncherAbilityList error: ${JSON.stringify(err)}`);
});
if (abilityList == null) {
console.debug('getLauncherAbilityList Empty');
}
for (let i = 0; i < abilityList.length; i++) {
let bundleName = abilityList[i].elementName.bundleName
let abilityName = abilityList[i].elementName.abilityName
//判断是否显示app
if(this.noToShowApp(bundleName,abilityName)){
continue;
}
//初始化appLabel
await bundle.getAbilityLabel(bundleName, abilityName)
.then((data) => {
this.bundleName.push(abilityList[i].elementName.bundleName)
this.abilityName.push(abilityList[i].elementName.abilityName)
this.moduleName.push(abilityList[i].elementName.moduleName)
this.appLabel.push(data)
console.info('Operation successful. Data: ' + JSON.stringify(data));
}).catch((error) => {
console.error('Operation failed. Cause: ' + JSON.stringify(error));
this.errorappLabel.push('i:' + i + error)
})
//初始化appIcon
await bundle.getAbilityIcon(bundleName, abilityName)
.then((data) => {
this.appIcon.push(data)
console.info('Operation successful. Data: ' + JSON.stringify(data));
}).catch((error) => {
console.error('Operation failed. Cause: ' + JSON.stringify(error));
})
}
//监控应用安装
innerBundleManager.on('BundleStatusChange', this.mBundleStatusCallback).then(data => {
console.info('XXX registerCallback success: ' + JSON.stringify(data));
}).catch(err => {
console.error('XXX registerCallback fail:' + JSON.stringify(err));
});
//初始化页面数(0,12,24...)
for (let i = 0; i < this.appIcon.length / 12; i++) {
this.pages.push(i * 12)
}
//自适应appSize;
display.getAllDisplay((err, data) => {
this.screenHeight = data[0].height;
this.screenWidth = data[0].width;
this.appSize = this.screenWidth/8;
if (err.code) {
console.error('Failed to obtain all the display objects. Code: ' + JSON.stringify(err));
return;
}
console.info('Succeeded in obtaining all the display objects. Data: ' + JSON.stringify(data));
});
}
build() {
Column() {
Row(){
Button( { type: ButtonType.Circle, stateEffect: false })
.backgroundImage($r('app.media.b3'))
.backgroundImageSize(ImageSize.Cover)
.width('80%')
.height('80%')
.fontSize(80)
.onClick(() => {
console.info(`Succeeded in clicking the 'Next' button.`)
try {
router.pushUrl({ url: 'pages/Index1' })
console.info('Succeeded in jumping to the second page.')
} catch (err) {
console.error(`Failed to jump to the second page.Code is ${err.code}, message is ${err.message}`)
}
})
Button( { type: ButtonType.Circle, stateEffect: false })
.backgroundImage($r('app.media.b2'))
.backgroundImageSize(ImageSize.Cover)
.width('80%')
.height('80%')
.fontSize(80)
.fontColor('white')
.onClick(() => {
console.info(`Succeeded in clicking the 'Next' button.`)
try {
router.pushUrl({ url: 'pages/Index2' })
console.info('Succeeded in jumping to the second page.')
} catch (err) {
console.error(`Failed to jump to the second page.Code is ${err.code}, message is ${err.message}`)
}
})
Button( { type: ButtonType.Circle, stateEffect: false })
.backgroundImage($r('app.media.b4'))
.backgroundImageSize(ImageSize.Cover)
.width('80%')
.height('80%')
.fontSize(80)
.onClick(() => {
console.info(`Succeeded in clicking the 'Next' button.`)
try {
router.pushUrl({ url: 'pages/Index3' })
console.info('Succeeded in jumping to the second page.')
} catch (err) {
console.error(`Failed to jump to the second page.Code is ${err.code}, message is ${err.message}`)
}
})
}
.height('50%')
Row(){
Button({ type: ButtonType.Circle, stateEffect: false })
.backgroundImage($r('app.media.b5'))
.backgroundImageSize(ImageSize.Cover)
.width('80%')
.height('80%')
.fontSize(80)
.onClick(() => {
console.info(`Succeeded in clicking the 'Next' button.`)
try {
router.pushUrl({ url: 'pages/Index4' })
console.info('Succeeded in jumping to the second page.')
} catch (err) {
console.error(`Failed to jump to the second page.Code is ${err.code}, message is ${err.message}`)
}
})
Button( { type: ButtonType.Circle, stateEffect: false })
.backgroundImage($r('app.media.b7'))
.backgroundImageSize(ImageSize.Cover)
.width('80%')
.height('80%')
.fontSize(60)
.fontColor('white')
.onClick(() => {
console.info(`Succeeded in clicking the 'Next' button.`)
try {
router.pushUrl({ url: 'pages/Index5' })
console.info('Succeeded in jumping to the second page.')
} catch (err) {
console.error(`Failed to jump to the second page.Code is ${err.code}, message is ${err.message}`)
}
})
Button({ type: ButtonType.Circle, stateEffect: false })
.backgroundImage($r('app.media.b6'))
.backgroundImageSize(ImageSize.Cover)
.width('80%')
.height('80%')
.fontSize(80)
.fontColor('white')
.onClick(() => {
console.info(`Succeeded in clicking the 'Next' button.`)
try {
router.pushUrl({ url: 'pages/Index6' })
console.info('Succeeded in jumping to the second page.')
} catch (err) {
console.error(`Failed to jump to the second page.Code is ${err.code}, message is ${err.message}`)
}
})
}
.height('50%')
}
.width('100%')
.backgroundImage($r('app.media.b1'))
.backgroundImageSize(1)
}
}

View File

@ -0,0 +1,47 @@
/**
* Copyright (c) 2021-2022 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 { Log } from '@ohos/common';
import { windowManager } from '@ohos/common';
import { FormManagerComponent } from '@ohos/form/component';
import PhonePresetStyleConstants from '../common/constants/PhonePresetStyleConstants';
const TAG = 'FormManagerView';
@Entry
@Component
struct FormManagerView {
onPageShow(): void {
Log.showInfo(TAG, 'onPageShow');
}
onPageHide(): void {
Log.showInfo(TAG, `onPageHide`);
}
onBackPress(): boolean {
Log.showInfo(TAG, 'onBackPress');
windowManager.destroyWindow(windowManager.FORM_MANAGER_WINDOW_NAME);
return true;
}
build() {
Column() {
FormManagerComponent()
}
.width(PhonePresetStyleConstants.DEFAULT_PERCENTAGE)
.height(PhonePresetStyleConstants.DEFAULT_PERCENTAGE)
}
}

View File

@ -0,0 +1,48 @@
/**
* Copyright (c) 2023-2023 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 { Log } from '@ohos/common';
import { windowManager } from '@ohos/common';
import { FormServiceComponent } from '@ohos/form/component';
import PhonePresetStyleConstants from '../common/constants/PhonePresetStyleConstants';
const TAG = 'FormServiceView';
@Entry
@Component
struct FormServiceView {
onPageShow(): void {
Log.showInfo(TAG, 'onPageShow');
}
onPageHide(): void {
Log.showInfo(TAG, `onPageHide`);
}
onBackPress(): boolean {
Log.showInfo(TAG, 'onBackPress');
windowManager.destroyWindow(windowManager.FORM_SERVICE_WINDOW_NAME);
return true;
}
build() {
Column() {
FormServiceComponent()
}
.width(PhonePresetStyleConstants.DEFAULT_PERCENTAGE)
.height(PhonePresetStyleConstants.DEFAULT_PERCENTAGE)
}
}

View File

@ -0,0 +1,101 @@
import router from '@ohos.router';
@Entry
@Component
struct PageVideo {
@State videoSrc: Resource = $r('app.media.c1')
@State previewUri: Resource =$r('app.media.h1')
@State curRate: PlaybackSpeed = PlaybackSpeed.Speed_Forward_1_00_X
@State isAutoPlay: boolean = false
@State showControls: boolean = true
controller: VideoController = new VideoController()
build() {
Column() {
Video({
src: this.videoSrc,
previewUri: this.previewUri,
currentProgressRate: this.curRate,
controller: this.controller
}).width('100%').height('80%')
.autoPlay(this.isAutoPlay)
.controls(this.showControls)
.onStart(() => {
console.info('onStart')
})
.onPause(() => {
console.info('onPause')
})
.onFinish(() => {
console.info('onFinish')
})
.onError(() => {
console.info('onError')
})
.onPrepared((e) => {
console.info('onPrepared is ' + e.duration)
})
.onSeeking((e) => {
console.info('onSeeking is ' + e.time)
})
.onSeeked((e) => {
console.info('onSeeked is ' + e.time)
})
.onUpdate((e) => {
console.info('onUpdate is ' + e.time)
})
Row() {
Button('切换来源').onClick(() => {
if(this.videoSrc != $r('app.media.c1')) {
this.previewUri = $r('app.media.h1')
this.videoSrc = $r('app.media.c1')
} else{
this.previewUri = $r('app.media.h1')
this.videoSrc = $r('app.media.c1')
}// 切换视频源
}).margin(20)
Button('显示导航').onClick(() => {
this.showControls = !this.showControls // 切换是否显示视频控制栏
})
.margin(20)
.onClick(() => {
console.info(`Succeeded in clicking the 'Next' button.`)
try {
router.pushUrl({ url: 'pages/EntryView' })
console.info('Succeeded in jumping to the second page.')
} catch (err) {
console.error(`Failed to jump to the second page.Code is ${err.code}, message is ${err.message}`)
}
})
}
.height('10%')
.width('100%')
Row() {
Button('开始').onClick(() => {
this.controller.start() // 开始播放
}).margin(20)
Button('暂停').onClick(() => {
this.controller.pause() // 暂停播放
}).margin(20)
Button('停止').onClick(() => {
this.controller.stop() // 结束播放
}).margin(20)
Button('回到10秒播放').onClick(() => {
this.controller.setCurrentTime(10, SeekMode.Accurate) // 精准跳转到视频的10s位置
}).margin(20)
}
.height('10%')
.width('100%')
}
.width('100%')
.backgroundImage($r('app.media.h1'))
.backgroundImageSize(1)
}
}

View File

@ -0,0 +1,101 @@
import router from '@ohos.router';
@Entry
@Component
struct PageVideo {
@State videoSrc: Resource = $r('app.media.hm3')
@State previewUri: Resource =$r('app.media.h1')
@State curRate: PlaybackSpeed = PlaybackSpeed.Speed_Forward_1_00_X
@State isAutoPlay: boolean = false
@State showControls: boolean = true
controller: VideoController = new VideoController()
build() {
Column() {
Video({
src: this.videoSrc,
previewUri: this.previewUri,
currentProgressRate: this.curRate,
controller: this.controller
}).width('100%').height('80%')
.autoPlay(this.isAutoPlay)
.controls(this.showControls)
.onStart(() => {
console.info('onStart')
})
.onPause(() => {
console.info('onPause')
})
.onFinish(() => {
console.info('onFinish')
})
.onError(() => {
console.info('onError')
})
.onPrepared((e) => {
console.info('onPrepared is ' + e.duration)
})
.onSeeking((e) => {
console.info('onSeeking is ' + e.time)
})
.onSeeked((e) => {
console.info('onSeeked is ' + e.time)
})
.onUpdate((e) => {
console.info('onUpdate is ' + e.time)
})
Row() {
Button('切换来源').onClick(() => {
if(this.videoSrc != $r('app.media.hm3')) {
this.previewUri = $r('app.media.h1')
this.videoSrc = $r('app.media.hm3')
} else{
this.previewUri = $r('app.media.h1')
this.videoSrc = $r('app.media.hm3')
}// 切换视频源
}).margin(20)
Button('显示导航').onClick(() => {
this.showControls = !this.showControls // 切换是否显示视频控制栏
})
.margin(20)
.onClick(() => {
console.info(`Succeeded in clicking the 'Next' button.`)
try {
router.pushUrl({ url: 'pages/EntryView' })
console.info('Succeeded in jumping to the second page.')
} catch (err) {
console.error(`Failed to jump to the second page.Code is ${err.code}, message is ${err.message}`)
}
})
}
.height('10%')
.width('100%')
Row() {
Button('开始').onClick(() => {
this.controller.start() // 开始播放
}).margin(20)
Button('暂停').onClick(() => {
this.controller.pause() // 暂停播放
}).margin(20)
Button('停止').onClick(() => {
this.controller.stop() // 结束播放
}).margin(20)
Button('回到10秒播放').onClick(() => {
this.controller.setCurrentTime(10, SeekMode.Accurate) // 精准跳转到视频的10s位置
}).margin(20)
}
.height('10%')
.width('100%')
}
.width('100%')
.backgroundImage($r('app.media.h1'))
.backgroundImageSize(1)
}
}

View File

@ -0,0 +1,101 @@
import router from '@ohos.router';
@Entry
@Component
struct PageVideo {
@State videoSrc: Resource = $r('app.media.hm2')
@State previewUri: Resource =$r('app.media.h1')
@State curRate: PlaybackSpeed = PlaybackSpeed.Speed_Forward_1_00_X
@State isAutoPlay: boolean = false
@State showControls: boolean = true
controller: VideoController = new VideoController()
build() {
Column() {
Video({
src: this.videoSrc,
previewUri: this.previewUri,
currentProgressRate: this.curRate,
controller: this.controller
}).width('100%').height('80%')
.autoPlay(this.isAutoPlay)
.controls(this.showControls)
.onStart(() => {
console.info('onStart')
})
.onPause(() => {
console.info('onPause')
})
.onFinish(() => {
console.info('onFinish')
})
.onError(() => {
console.info('onError')
})
.onPrepared((e) => {
console.info('onPrepared is ' + e.duration)
})
.onSeeking((e) => {
console.info('onSeeking is ' + e.time)
})
.onSeeked((e) => {
console.info('onSeeked is ' + e.time)
})
.onUpdate((e) => {
console.info('onUpdate is ' + e.time)
})
Row() {
Button('切换来源').onClick(() => {
if(this.videoSrc != $r('app.media.hm2')) {
this.previewUri = $r('app.media.h1')
this.videoSrc = $r('app.media.hm2')
} else{
this.previewUri = $r('app.media.h1')
this.videoSrc = $r('app.media.hm2')
}// 切换视频源
}).margin(20)
Button('显示导航').onClick(() => {
this.showControls = !this.showControls // 切换是否显示视频控制栏
})
.margin(20)
.onClick(() => {
console.info(`Succeeded in clicking the 'Next' button.`)
try {
router.pushUrl({ url: 'pages/EntryView' })
console.info('Succeeded in jumping to the second page.')
} catch (err) {
console.error(`Failed to jump to the second page.Code is ${err.code}, message is ${err.message}`)
}
})
}
.height('10%')
.width('100%')
Row() {
Button('开始').onClick(() => {
this.controller.start() // 开始播放
}).margin(20)
Button('暂停').onClick(() => {
this.controller.pause() // 暂停播放
}).margin(20)
Button('停止').onClick(() => {
this.controller.stop() // 结束播放
}).margin(20)
Button('回到10秒播放').onClick(() => {
this.controller.setCurrentTime(10, SeekMode.Accurate) // 精准跳转到视频的10s位置
}).margin(20)
}
.height('10%')
.width('100%')
}
.width('100%')
.backgroundImage($r('app.media.h1'))
.backgroundImageSize(1)
}
}

View File

@ -0,0 +1,76 @@
// 引入router
import router from '@ohos.router';
// 引入弹窗
import prompt from '@system.prompt';
let msg: String = 'login页面传来的数据'
@Entry
@Component
struct RowPage {
@State account: string = ''
//@State password: any = ''
build() {
Column({ space: 10 }) {
Image($r('app.media.icon'))
.width('30%')
.height('15%')
.margin({ top: 10, bottom: 2 })
Text('登录界面')
.fontSize(24)
.fontWeight(FontWeight.Medium)
.fontColor('#182431')
TextInput({ placeholder: '账号' })
.maxLength(6)
.type(InputType.Number)
.onChange((value: string) => {
this.account = value;
})
.backgroundColor('#F0F2F4')
.border({ color: '#ff008aff', width: '100%' })
TextInput({ placeholder: '密码' })
.type(InputType.Password)
.onChange((value: string) => {
this.password = value;
})
.backgroundColor('#F0F2F4')
.border({ color: '#ff008aff', width: '100%' })
Row() {
Text('短信验证码登录')
.fontColor('#017DFF')
Text('忘记密码')
.fontColor('#017DFF')
}.width('100%')
.margin({ top: 5 })
.justifyContent(FlexAlign.SpaceBetween)
Button('登录')
.onClick(() => {
if (this.account != '') {
router.pushUrl({
// 未创建的页面
url: 'pages/ListPage',
params: {
src: msg,
}
})
} else {
prompt.showToast({
message: '请输入账号密码!',
duration: 2000,
});
}
}
)
.width('100%')
.margin({ top: 20, bottom: 5 })
Text('注册账号')
.fontColor('#017DFF')
}.height('100%')
.width('100%')
.padding(10)
.backgroundColor('#F1F3F5')
}
}

View File

@ -0,0 +1,101 @@
import router from '@ohos.router';
@Entry
@Component
struct PageVideo {
@State videoSrc: Resource = $r('app.media.c1')
@State previewUri: Resource =$r('app.media.h1')
@State curRate: PlaybackSpeed = PlaybackSpeed.Speed_Forward_1_00_X
@State isAutoPlay: boolean = false
@State showControls: boolean = true
controller: VideoController = new VideoController()
build() {
Column() {
Video({
src: this.videoSrc,
previewUri: this.previewUri,
currentProgressRate: this.curRate,
controller: this.controller
}).width('100%').height('80%')
.autoPlay(this.isAutoPlay)
.controls(this.showControls)
.onStart(() => {
console.info('onStart')
})
.onPause(() => {
console.info('onPause')
})
.onFinish(() => {
console.info('onFinish')
})
.onError(() => {
console.info('onError')
})
.onPrepared((e) => {
console.info('onPrepared is ' + e.duration)
})
.onSeeking((e) => {
console.info('onSeeking is ' + e.time)
})
.onSeeked((e) => {
console.info('onSeeked is ' + e.time)
})
.onUpdate((e) => {
console.info('onUpdate is ' + e.time)
})
Row() {
Button('切换来源').onClick(() => {
if(this.videoSrc != $r('app.media.c1')) {
this.previewUri = $r('app.media.h1')
this.videoSrc = $r('app.media.c1')
} else{
this.previewUri = $r('app.media.h1')
this.videoSrc = $r('app.media.c1')
}// 切换视频源
}).margin(20)
Button('显示导航').onClick(() => {
this.showControls = !this.showControls // 切换是否显示视频控制栏
})
.margin(20)
.onClick(() => {
console.info(`Succeeded in clicking the 'Next' button.`)
try {
router.pushUrl({ url: 'pages/EntryView' })
console.info('Succeeded in jumping to the second page.')
} catch (err) {
console.error(`Failed to jump to the second page.Code is ${err.code}, message is ${err.message}`)
}
})
}
.height('10%')
.width('100%')
Row() {
Button('开始').onClick(() => {
this.controller.start() // 开始播放
}).margin(20)
Button('暂停').onClick(() => {
this.controller.pause() // 暂停播放
}).margin(20)
Button('停止').onClick(() => {
this.controller.stop() // 结束播放
}).margin(20)
Button('回到10秒播放').onClick(() => {
this.controller.setCurrentTime(10, SeekMode.Accurate) // 精准跳转到视频的10s位置
}).margin(20)
}
.height('10%')
.width('100%')
}
.width('100%')
.backgroundImage($r('app.media.h1'))
.backgroundImageSize(1)
}
}

View File

@ -0,0 +1,101 @@
import router from '@ohos.router';
@Entry
@Component
struct PageVideo {
@State videoSrc: Resource = $r('app.media.c1')
@State previewUri: Resource =$r('app.media.h1')
@State curRate: PlaybackSpeed = PlaybackSpeed.Speed_Forward_1_00_X
@State isAutoPlay: boolean = false
@State showControls: boolean = true
controller: VideoController = new VideoController()
build() {
Column() {
Video({
src: this.videoSrc,
previewUri: this.previewUri,
currentProgressRate: this.curRate,
controller: this.controller
}).width('100%').height('80%')
.autoPlay(this.isAutoPlay)
.controls(this.showControls)
.onStart(() => {
console.info('onStart')
})
.onPause(() => {
console.info('onPause')
})
.onFinish(() => {
console.info('onFinish')
})
.onError(() => {
console.info('onError')
})
.onPrepared((e) => {
console.info('onPrepared is ' + e.duration)
})
.onSeeking((e) => {
console.info('onSeeking is ' + e.time)
})
.onSeeked((e) => {
console.info('onSeeked is ' + e.time)
})
.onUpdate((e) => {
console.info('onUpdate is ' + e.time)
})
Row() {
Button('切换来源').onClick(() => {
if(this.videoSrc != $r('app.media.c1')) {
this.previewUri = $r('app.media.h1')
this.videoSrc = $r('app.media.c1')
} else{
this.previewUri = $r('app.media.h1')
this.videoSrc = $r('app.media.c1')
}// 切换视频源
}).margin(20)
Button('显示导航').onClick(() => {
this.showControls = !this.showControls // 切换是否显示视频控制栏
})
.margin(20)
.onClick(() => {
console.info(`Succeeded in clicking the 'Next' button.`)
try {
router.pushUrl({ url: 'pages/EntryView' })
console.info('Succeeded in jumping to the second page.')
} catch (err) {
console.error(`Failed to jump to the second page.Code is ${err.code}, message is ${err.message}`)
}
})
}
.height('10%')
.width('100%')
Row() {
Button('开始').onClick(() => {
this.controller.start() // 开始播放
}).margin(20)
Button('暂停').onClick(() => {
this.controller.pause() // 暂停播放
}).margin(20)
Button('停止').onClick(() => {
this.controller.stop() // 结束播放
}).margin(20)
Button('回到10秒播放').onClick(() => {
this.controller.setCurrentTime(10, SeekMode.Accurate) // 精准跳转到视频的10s位置
}).margin(20)
}
.height('10%')
.width('100%')
}
.width('100%')
.backgroundImage($r('app.media.h1'))
.backgroundImageSize(1)
}
}

View File

@ -0,0 +1,101 @@
/**
* Copyright (c) 2021-2022 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 { Log } from '@ohos/common';
import { Trace } from '@ohos/common';
import { windowManager } from '@ohos/common';
import { RecentMissionInfo } from '@ohos/common';
import { RecentsStyleConstants } from '@ohos/recents';
import { RecentMissionsStage } from '@ohos/recents';
import { RecentMissionsViewModel } from '@ohos/recents';
import { RecentMissionsSingleLayout } from '@ohos/recents/component';
import { RecentMissionsDoubleLayout } from '@ohos/recents/component';
const TAG = 'RecentView';
@Entry
@Component
struct RecentView {
@StorageLink('recentMissionsList') recentMissionsList: RecentMissionInfo[] = [];
@State isClickSubComponent: boolean = false;
private mRecentMissionsStage: RecentMissionsStage = new RecentMissionsStage();
private mRecentMissionsViewModel?: RecentMissionsViewModel;
@State mRecentMissionsRowType: string = '';
@State recentLoadedCompleted: boolean = false;
onPageShow(): void {
Log.showInfo(TAG, 'onPageShow');
this.isClickSubComponent = false;
this.mRecentMissionsStage.onCreate();
this.mRecentMissionsViewModel = RecentMissionsViewModel.getInstance();
this.mRecentMissionsRowType = this.mRecentMissionsViewModel.getRecentMissionsRowType();
this.mRecentMissionsViewModel.getRecentMissionsList();
AppStorage.setOrCreate('recentIdx', 0);
this.recentLoadedCompleted = true;
}
onPageHide(): void {
Log.showInfo(TAG, `onPageHide`);
this.recentLoadedCompleted = false;
this.isClickSubComponent = false;
this.mRecentMissionsStage.onDestroy();
}
onBackPress(): boolean {
Log.showInfo(TAG, 'RecentMission EntryView onBackPress');
windowManager.hideWindow(windowManager.RECENT_WINDOW_NAME);
return true;
}
build() {
Column() {
if (this.recentMissionsList && this.mRecentMissionsViewModel && this.mRecentMissionsRowType) {
if (this.recentMissionsList.length) {
if (this.mRecentMissionsRowType === 'single') {
RecentMissionsSingleLayout({ recentMissionsSingleList: $recentMissionsList,
isClickSubComponent: $isClickSubComponent});
}
if (this.mRecentMissionsRowType === 'double') {
RecentMissionsDoubleLayout({ recentMissionsDoubleList: $recentMissionsList,
isClickSubComponent: $isClickSubComponent});
}
} else {
if (this.recentLoadedCompleted) {
Text($r('app.string.No_running_apps_recently'))
.fontColor(RecentsStyleConstants.DEFAULT_FONT_COLOR)
.fontSize(RecentsStyleConstants.DEFAULT_FONT_SIZE)
}
}
}
if (this.traceBuildEnd()) { }
}
.alignItems(HorizontalAlign.Center)
.justifyContent(FlexAlign.Center)
.width(RecentsStyleConstants.DEFAULT_LAYOUT_PERCENTAGE)
.height(RecentsStyleConstants.DEFAULT_LAYOUT_PERCENTAGE)
.backgroundImage(RecentsStyleConstants.DEFAULT_RECENT_BACKGROUND_IMAGE)
.onClick(() => {
if (!this.isClickSubComponent) {
Log.showInfo(TAG, 'click recent missions area');
RecentMissionsViewModel.getInstance().backView();
}
})
}
private traceBuildEnd(): boolean {
Trace.end(Trace.CORE_METHOD_START_RECENTS);
return true;
}
}

View File

@ -0,0 +1,90 @@
/*
* Copyright (c) 2020-2023 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.
*/
{
"module": {
"name": "phone_launcher",
"type": "entry",
"srcEntry": "./ets/Application/AbilityStage.ts",
"description": "$string:mainability_description",
"mainElement": "com.ohos.launcher.MainAbility",
"deviceTypes": [
"default",
"tablet"
],
"metadata": [
{
"name": "ArkTSPartialUpdate",
"value": "true"
}
],
"deliveryWithInstall": true,
"installationFree": false,
"pages": "$profile:main_pages",
"extensionAbilities": [
{
"priority": 2,
"skills": [
{
"entities": [
"entity.system.home",
"flag.home.intent.from.system"
],
"actions": [
"action.system.home",
"com.ohos.action.main",
"action.form.publish"
]
}
],
"exported": false,
"name": "com.ohos.launcher.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:entry_MainAbility",
"srcEntry": "./ets/MainAbility/MainAbility.ts",
"type": "service"
}
],
"requestPermissions": [
{
"name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name": "ohos.permission.INSTALL_BUNDLE"
},
{
"name": "ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name": "ohos.permission.MANAGE_MISSIONS"
},
{
"name": "ohos.permission.REQUIRE_FORM"
},
{
"name": "ohos.permission.INPUT_MONITORING"
},
{
"name": "ohos.permission.NOTIFICATION_CONTROLLER"
},
{
"name": "ohos.permission.MANAGE_SECURE_SETTINGS"
},
{
"name": "ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
]
}
}

View File

@ -0,0 +1,180 @@
{
"string": [
{
"name": "entry_MainAbility",
"value": "Launcher"
},
{
"name": "mainability_description",
"value": "ETS_Empty Feature Ability"
},
{
"name": "into_settings",
"value": "Launcher settings"
},
{
"name": "add_blank_page",
"value": "Add Blank Page"
},
{
"name": "delete_blank_page",
"value": "Delete Blank Page"
},
{
"name": "layout",
"value": "Layout"
},
{
"name": "layout_style",
"value": "Layout Style"
},
{
"name": "launcher_layout",
"value": "Launcher Layout"
},
{
"name": "recent_tasks_setting",
"value": "Recent Tasks Setting"
},
{
"name": "cancel",
"value": "Cancel"
},
{
"name": "uninstall",
"value": "Uninstall"
},
{
"name": "submit",
"value": "Submit"
},
{
"name": "launcher_edit",
"value": "Launcher Edit"
},
{
"name": "uninstall_success",
"value": "Successfully uninstalled"
},
{
"name": "uninstall_failed",
"value": "Uninstallation failed"
},
{
"name": "disable_uninstall",
"value": "Disable uninstall"
},
{
"name": "duplicate_add",
"value": "Duplicate add to desktop"
},
{
"name": "no_space_for_add",
"value": "No Space for add"
},
{
"name": "delete_app",
"value": "Delete application"
},
{
"name": "disable_add_to_dock",
"value": "Disable add to dock"
},
{
"name": "disable_add_to_delete",
"value": "Disable add to delete"
},
{
"name": "add_form_to_desktop",
"value": "add widget to desktop"
},
{
"name": "form_center",
"value": "Form Center"
},
{
"name": "form_edit",
"value": "edit service widget"
},
{
"name": "app_center_menu_add_dock",
"value": "add to dock"
},
{
"name": "app_center_menu_add_desktop",
"value": "add to desktop"
},
{
"name": "disable_to_move",
"value": "disable to move"
},
{
"name": "add",
"value": "Add"
},
{
"name": "add_to",
"value": "Add to "
},
{
"name": "new_folder_name",
"value": "New folder"
},
{
"name": "rename_folder",
"value": "Rename"
},
{
"name": "cancel_dialog",
"value": "cancel"
},
{
"name": "confirm_dialog",
"value": "confirm"
},
{
"name": "add_to_desktop",
"value": "add to desktop"
},
{
"name": "add_form_to_desktop_more",
"value": "add widget to desktop more"
},
{
"name": "app_center_menu_uninstall",
"value": "uninstall"
},
{
"name": "delete_form",
"value": "Delete Service Widget"
},
{
"name": "is_delete_form",
"value": "Whether to remove "
},
{
"name": "form",
"value": "service widget"
},
{
"name": "remove_form_dialog_content",
"value": "Long press the application to enter the service widget management page to add a new service widget"
},
{
"name": "gesture_navigation_options",
"value": "Gesture Navigation Options"
},
{
"name": "No_running_apps_recently",
"value": "no recently running applications"
},
{
"name": "app_menu_open",
"value": "open"
},
{
"name": "remove_app_from_folder",
"value": "remove app from folder"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 B

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Public/ic_public_cancel</title>
<defs>
<path d="M19.7781746,4.22182541 C20.0710678,4.51471863 20.0710678,4.98959236 19.7781746,5.28248558 L5.28248558,19.7781746 C4.98959236,20.0710678 4.51471863,20.0710678 4.22182541,19.7781746 C3.92893219,19.4852814 3.92893219,19.0104076 4.22182541,18.7175144 L10.9395166,11.9994697 L4.22182541,5.28248558 C3.92893219,4.98959236 3.92893219,4.51471863 4.22182541,4.22182541 C4.51471863,3.92893219 4.98959236,3.92893219 5.28248558,4.22182541 L12,10.9389863 L18.7175144,4.22182541 C19.0104076,3.92893219 19.4852814,3.92893219 19.7781746,4.22182541 Z M19.7781746,18.7175144 C20.0710678,19.0104076 20.0710678,19.4852814 19.7781746,19.7781746 C19.4852814,20.0710678 19.0104076,20.0710678 18.7175144,19.7781746 L12.7072836,13.7675902 L13.767767,12.7071068 L19.7781746,18.7175144 Z" id="path-1"></path>
</defs>
<g id="Public/ic_public_cancel" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<use id="形状" fill="#000000" xlink:href="#path-1"></use>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@ -0,0 +1,15 @@
{
"src": [
"pages/FormManagerView",
"pages/FormServiceView",
"pages/EmptyPage",
"pages/EntryView",
"pages/RecentView",
"pages/Index1",
"pages/Index2",
"pages/Index3",
"pages/Index4",
"pages/Index5",
"pages/Index6"
]
}

View File

@ -0,0 +1,152 @@
{
"string": [
{
"name": "entry_MainAbility",
"value": "Launcher"
},
{
"name": "mainability_description",
"value": "ETS_Empty Feature Ability"
},
{
"name": "into_settings",
"value": "Launcher settings"
},
{
"name": "add_blank_page",
"value": "Add Blank Page"
},
{
"name": "delete_blank_page",
"value": "Delete Blank Page"
},
{
"name": "layout",
"value": "Layout"
},
{
"name": "layout_style",
"value": "Layout Style"
},
{
"name": "launcher_layout",
"value": "Launcher Layout"
},
{
"name": "recent_tasks_setting",
"value": "Recent Tasks Setting"
},
{
"name": "cancel",
"value": "Cancel"
},
{
"name": "uninstall",
"value": "Uninstall"
},
{
"name": "submit",
"value": "Submit"
},
{
"name": "launcher_edit",
"value": "Launcher Edit"
},
{
"name": "uninstall_success",
"value": "Successfully uninstalled"
},
{
"name": "uninstall_failed",
"value": "Uninstallation failed"
},
{
"name": "disable_uninstall",
"value": "Disable uninstall"
},
{
"name": "duplicate_add",
"value": "Duplicate add to desktop"
},
{
"name": "no_space_for_add",
"value": "No Space for add"
},
{
"name": "delete_app",
"value": "Delete application"
},
{
"name": "disable_add_to_dock",
"value": "Disable add to dock"
},
{
"name": "disable_add_to_delete",
"value": "Disable add to delete"
},
{
"name": "add_form_to_desktop",
"value": "add widget to desktop"
},
{
"name": "form_edit",
"value": "edit service widget"
},
{
"name": "app_center_menu_add_dock",
"value": "add to dock"
},
{
"name": "app_center_menu_add_desktop",
"value": "add to desktop"
},
{
"name": "disable_to_move",
"value": "disable to move"
},
{
"name": "add_to",
"value": "Add to "
},
{
"name": "new_folder_name",
"value": "New folder"
},
{
"name": "rename_folder",
"value": "Rename"
},
{
"name": "cancel_dialog",
"value": "cancel"
},
{
"name": "confirm_dialog",
"value": "confirm"
},
{
"name": "remove_form_dialog_content",
"value": "Long press the application to enter the service widget management page to add a new service widget"
},
{
"name": "gesture_navigation_options",
"value": "Gesture Navigation Options"
},
{
"name": "No_running_apps_recently",
"value": "no recently running applications"
},
{
"name": "app_menu_open",
"value": "open"
},
{
"name": "remove_app_from_folder",
"value": "remove app from folder"
},
{
"name": "isUninstall",
"value": "Uninstall "
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

View File

@ -0,0 +1,6 @@
{
"hvigorVersion": "3.0.9",
"dependencies": {
"@ohos/hvigor-ohos-plugin": "3.0.9"
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,17 @@
/**
* Copyright (c) 2022 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.
*/
// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
module.exports = require('@ohos/hvigor-ohos-plugin').appTasks

View File

@ -0,0 +1,48 @@
#!/bin/bash
# ----------------------------------------------------------------------------
# Hvigor startup script, version 1.0.0
#
# Required ENV vars:
# ------------------
# NODE_HOME - location of a Node home dir
# or
# Add /usr/local/nodejs/bin to the PATH environment variable
# ----------------------------------------------------------------------------
HVIGOR_APP_HOME="`pwd -P`"
HVIGOR_WRAPPER_SCRIPT=${HVIGOR_APP_HOME}/hvigor/hvigor-wrapper.js
warn() {
echo ""
echo -e "\033[1;33m`date '+[%Y-%m-%d %H:%M:%S]'`$@\033[0m"
}
error() {
echo ""
echo -e "\033[1;31m`date '+[%Y-%m-%d %H:%M:%S]'`$@\033[0m"
}
fail() {
error "$@"
exit 1
}
# Determine node to start hvigor wrapper script
if [ -n "${NODE_HOME}" ];then
EXECUTABLE_NODE="${NODE_HOME}/bin/node"
if [ ! -x "$EXECUTABLE_NODE" ];then
fail "ERROR: NODE_HOME is set to an invalid directory,check $NODE_HOME\n\nPlease set NODE_HOME in your environment to the location where your nodejs installed"
fi
else
EXECUTABLE_NODE="node"
which ${EXECUTABLE_NODE} > /dev/null 2>&1 || fail "ERROR: NODE_HOME is not set and not 'node' command found in your path"
fi
# Check hvigor wrapper script
if [ ! -r "$HVIGOR_WRAPPER_SCRIPT" ];then
fail "ERROR: Couldn't find hvigor/hvigor-wrapper.js in ${HVIGOR_APP_HOME}"
fi
# start hvigor-wrapper script
exec "${EXECUTABLE_NODE}" \
"${HVIGOR_WRAPPER_SCRIPT}" "$@"

View File

@ -0,0 +1,64 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Hvigor startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
set WRAPPER_MODULE_PATH=%APP_HOME%\hvigor\hvigor-wrapper.js
set NODE_EXE=node.exe
goto start
:start
@rem Find node.exe
if defined NODE_HOME goto findNodeFromNodeHome
%NODE_EXE% --version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH.
echo.
echo Please set the NODE_HOME variable in your environment to match the
echo location of your NodeJs installation.
goto fail
:findNodeFromNodeHome
set NODE_HOME=%NODE_HOME:"=%
set NODE_EXE_PATH=%NODE_HOME%/%NODE_EXE%
if exist "%NODE_EXE_PATH%" goto execute
echo.
echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH.
echo.
echo Please set the NODE_HOME variable in your environment to match the
echo location of your NodeJs installation.
goto fail
:execute
@rem Execute hvigor
"%NODE_EXE%" %WRAPPER_MODULE_PATH% %*
if "%ERRORLEVEL%" == "0" goto hvigorwEnd
:fail
exit /b 1
:hvigorwEnd
if "%OS%" == "Windows_NT" endlocal
:end

View File

@ -0,0 +1,9 @@
{
"devDependencies": {
"@ohos/hypium": "1.0.6"
},
"name": "launcher",
"description": "",
"version": "1.0.0",
"dependencies": {}
}