• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16import router from '@ohos.router';
17
18@Component
19export struct SmartPerfHostHomeView {
20  build() {
21    Row() {
22      Column() {
23        Text($r('app.string.smart_perf_host'))
24          .fontSize(30)
25          .fontWeight(FontWeight.Bold)
26          .margin({ top: 30 })
27
28        Button($r('app.string.frame_timeline_before_optimization'))
29          .width("80%")
30          .fontSize(18)
31          .margin({ top: 30 })
32          .onClick(() => {
33            router.pushUrl({ url: "pages/smartPerfHost/FrameTimelineBeforeOptimizationPage" });
34          })
35        Button($r('app.string.frame_timeline_after_optimization'))
36          .width("80%")
37          .fontSize(18)
38          .margin({ top: 30 })
39          .onClick(() => {
40            router.pushUrl({ url: "pages/smartPerfHost/FrameTimelineAfterOptimizationPage" });
41          })
42
43        Button($r('app.string.app_startup_before_optimization'))
44          .width("80%")
45          .fontSize(18)
46          .margin({ top: 30 })
47          .onClick(() => {
48            router.pushUrl({ url: "pages/smartPerfHost/AppStartupBeforeOptimizationPage" });
49          })
50        Button($r('app.string.app_startup_after_optimization'))
51          .width("80%")
52          .fontSize(18)
53          .margin({ top: 30 })
54          .onClick(() => {
55            router.pushUrl({ url: "pages/smartPerfHost/AppStartupAfterOptimizationPage" });
56          })
57      }
58      .width('100%')
59      .height("100%")
60    }
61    .height('100%')
62  }
63}