• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2023-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 { Log } from '@ohos/common';
17import router from '@ohos.router';
18
19const TAG = 'AboutPageComponent'
20@Component
21export struct AboutPageComponent {
22  @State bckColor: Resource = $r('app.color.preview_background_color');
23
24  build(){
25    Image($r('app.media.ic_public_detail')).width($r('app.float.image_comp_width')).height($r('app.float.image_comp_height'))
26      .onClick(() => {
27        Log.info(TAG, 'PrivacyStatementPage onClick');
28        router.pushUrl({
29          url: 'pages/AboutPage'
30        })
31      })
32      .backgroundColor(this.bckColor)
33      .clip(new Circle({width: 24, height: 24})).onTouch((event) => {
34      Log.info("ClickableImage", "event.type: " + JSON.stringify(event.type));
35      if (event.type === TouchType.Down) {
36        this.bckColor = $r('sys.color.ohos_fa_click_effect')
37      } else if (event.type === TouchType.Up) {
38        Log.info("ClickableImage", "onTouch is Up");
39        this.bckColor = $r('app.color.preview_background_color');
40      }
41    })
42  }
43}