1/*
2 * Copyright (c) 2024 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
16@Entry
17@Component
18struct PluginWindow {
19  @State titleText: string = ''
20  aboutToAppear(): void {
21    console.debug('PluginWindow page aboutToAppear');
22  }
23
24  build() {
25
26    Flex({ alignItems: ItemAlign.Center }) {
27      Row() {
28        Flex({direction: FlexDirection.Column, justifyContent: FlexAlign.Center}) {
29          Text($r('app.string.notice_title'))
30            .fontSize($r('sys.float.ohos_id_text_size_headline8'))
31            .fontWeight(FontWeight.Medium)
32            .align(Alignment.Start)
33            .backgroundColor(Color.Orange)
34
35          Text(this.titleText)
36            .align(Alignment.Start)
37            .fontSize($r('sys.float.ohos_id_text_size_sub_title3'))
38            .backgroundColor($r('sys.color.ohos_id_color_text_hint'))
39            .margin({
40              top: 2
41            })
42        }
43        .padding({
44          left: 24
45        })
46      }
47      .flexGrow(1)
48      .justifyContent(FlexAlign.Start)
49      .padding({ right: $r('sys.float.padding_level2') })
50
51
52      Column(){
53        Image('')
54          .width('32vp')
55          .height('32vp')
56          .backgroundColor(Color.Red)
57          .objectFit(ImageFit.Contain)
58          .autoResize(false)
59          .draggable(false)
60
61      }
62      .onClick(() => {
63        console.log('1111111111')
64      })
65      .margin({
66        right: 12
67      })
68    }
69    .height(64)
70    .width('100%')
71    .borderRadius(20)
72    .backgroundColor(Color.Gray)
73  }
74
75}