# ohos-titlebar **Repository Path**: tycom/ohos-titlebar ## Basic Information - **Project Name**: ohos-titlebar - **Description**: 🔥 通用,功能全面的自定义标题栏,支持沉浸式标题栏,颜色渐变 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 4 - **Created**: 2021-08-09 - **Last Updated**: 2024-06-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ohos-titlebar #### 项目介绍 - 项目名称:ohos-titlebar - 所属系列:openharmony的第三方组件适配移植 - 功能:抛弃在开发过程中,因页面过多,需要构建大量重复的标题栏布局。本项目总结了几种常用的使用场景,将标题栏封装成控件,Java代码实现,对当前主流的沉浸式提供了支持。 - 项目移植状态:100% - 调用差异:无 - 基线版本:master分支 - 开发版本:sdk6,DevEco Studio2.2 Beta1 #### 效果演示 #### 安装教程 1、在项目根目录下的build.gradle文件中 ```gradle allprojects { repositories { maven { url 'https://s01.oss.sonatype.org/content/repositories/releases/' } } } ``` 2.在entry模块的build.gradle文件中 ```gradle dependencies { implementation('com.gitee.chinasoft_ohos:ohos-titlebar:1.0.0') ...... } ``` #### 使用说明 1. 布局文件定义,提供控件:CustomTitleBar ``` xml ``` 自定义属性 **CustomTitleBar** | 名称 |说明 | |---|---| |bg_color|TitleBar背景色| |left_bank_button|左侧返回图标是否显示| |left_bank_icon_text|左侧返回图标文字是否显示| |left_scan_dil|左侧扫一扫是否显示| |left_bank_icon|左侧返回按钮的图标| |left_scan_icon|左侧扫一扫按钮的图标| |left_bank_text|返回按钮文字| |left_scan_icon_text|左边扫一扫文字| |left_bank_text_size|返回按钮文字大小| |centre_title_buttontext|中间主标题的文本| |centre_sub_text|中间副标题的文本| |centre_title_button_textsize|中间主标题大小| |center_title_button_textcolor|中间主标题颜色| |centre_title_button_icon|中间扫一扫按钮的图标| |contre_search_del|search显示| |centre_pmd|跑马灯显示| |centre_progress_img|RoundProgressBar是否显示| |right_dil|右边是否显示| |right_zoom|右边放大镜是否显示| |right_text|右侧确定文字| |right_zoom_icon|右侧放大镜按钮的图标| |right_message_dil|右边消息列表是否显示| |right_message_img|右侧message图标| |right_message_img_yuan|右侧message圆图标| |right_message_img_yuan_text|右侧消息圆的文本| |right_message_text|右侧消息的文本| #### 测试信息 CodeCheck代码测试无异常 CloudTest代码测试无异常 病毒安全检测通过 当前版本demo功能与原组件基本无差异 #### 版本迭代 - 1.0.0 #### 版权和许可信息 ``` Copyright 2017 wuhenzhizao 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. ```