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 prompt from '@ohos.promptAction' 17 18@Component 19export struct RequestBar { 20 build() { 21 Column() { 22 Divider().width('85%').margin({ right: $r('app.float.request_bar_ic_margin') }) 23 Row() { 24 Image($r('app.media.ic_public_gps')) 25 .width($r('app.float.request_bar_ic_width')) 26 .height($r('app.float.request_bar_ic_width')) 27 .margin({ left: $r('app.float.request_bar_ic_left_margin') }) 28 Text($r('app.string.gps')) 29 .fontSize($r('app.float.request_bar_font_size')) 30 .fontWeight(FontWeight.Medium) 31 .fontColor($r('app.color.request_bar_font')) 32 .margin({ left: $r('app.float.request_bar_text_left_margin') }) 33 Blank() 34 Image($r('app.media.ic_public_arrow_right')) 35 .width($r('app.float.request_bar_ic_width')) 36 .height($r('app.float.request_bar_ic_width')) 37 .margin({ right: $r('app.float.request_bar_ic_margin') }) 38 } 39 .width('90%') 40 .height($r('app.float.request_bar_row_height')) 41 .margin({ right: $r('app.float.request_bar_text_left_margin') }) 42 .onClick(() => { 43 prompt.showDialog({ message: $r('app.string.user_tip') }) 44 }) 45 46 Divider().width('85%').margin({ right: $r('app.float.request_bar_ic_margin') }) 47 Row() { 48 Image($r('app.media.ic_public_contacts')) 49 .width($r('app.float.request_bar_ic_width')) 50 .height($r('app.float.request_bar_ic_width')) 51 .margin({ left: $r('app.float.request_bar_ic_left_margin') }) 52 Text($r('app.string.anyone')) 53 .fontSize($r('app.float.request_bar_font_size')) 54 .fontWeight(FontWeight.Medium) 55 .fontColor($r('app.color.request_bar_font')) 56 .margin({ left: $r('app.float.request_bar_text_left_margin') }) 57 Blank() 58 Text($r('app.string.open')) 59 .fontSize($r('app.float.request_bar_font_size')) 60 .fontWeight(FontWeight.Medium) 61 .fontColor($r('app.color.font_b2b2b2')) 62 Image($r('app.media.ic_public_arrow_right')) 63 .width($r('app.float.request_bar_ic_width')) 64 .height($r('app.float.request_bar_ic_width')) 65 .margin({ right: $r('app.float.request_bar_ic_margin') }) 66 } 67 .width('90%') 68 .height($r('app.float.request_bar_row_height')) 69 .margin({ right: $r('app.float.request_bar_text_left_margin') }) 70 .onClick(() => { 71 prompt.showDialog({ message: $r('app.string.user_tip') }) 72 }) 73 74 Divider().width('85%').margin({ right: $r('app.float.request_bar_ic_margin') }) 75 } 76 .width('100%') 77 .height('30%') 78 .margin($r('app.float.request_bar_margin')) 79 } 80}