3 Star 0 Fork 1

TS_OHOS / UIUtil

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

UIUtil

本项目是基于开源项目UIUtil进行harmonyos化的移植和开发的,可以通过项目标签以及 github地址

移植版本:源master版本(5306103 on 10 Jan)

项目介绍

项目名称:UIUtil

所属系列:harmonyos的第三方组件适配移植

功能:

UIUtil for harmonyos, Lyrics, Tick animations, Comparisons, Satellite menus, Praise, Slide buttons, TAB indicators, Contact sorting, Drag sorting, Skidding deletes, Shadow effects, RecyclerView nesting RecyclerView, Map list Poi/Drawer effects, Progress settings, Clock set, Damping, Progress, Album, Snap, Progress, CircleDownload, AdvertSwitcher, …

项目移植状态:完全移植

调用差异:基本没有使用差异,请参照demo使用

原项目Doc地址:https://github.com/Dsiner/UIUtil

编程语言:java

项目截图(涉及文件仅供demo测试使用)

demo运行效果 运行效果 运行效果 运行效果 运行效果 运行效果 运行效果 运行效果 运行效果 运行效果 运行效果 运行效果 运行效果 运行效果 运行效果 运行效果 运行效果 运行效果

安装教程

方案一

可以先下载项目,将项目中的lib_common库,lib_layout库,lib_view库提取出来放在所需项目中通过build配置

dependencies {
    implementation project(":lib_common")
    implementation project(":lib_layout")
    implementation project(":lib_view")
}

方案二

  • 1.项目根目录的build.gradle中的repositories添加:
    buildscript {
       repositories {
           ...
           mavenCentral()
       }
       ...
   }
   
   allprojects {
       repositories {
           ...
           mavenCentral()
       }
   }
  • 2.开发者在自己的项目中添加依赖
dependencies {
    implementation 'com.gitee.ts_ohos:lib_common:1.0.0'
    implementation 'com.gitee.ts_ohos:lib_layout:1.0.0'
    implementation 'com.gitee.ts_ohos:lib_view:1.0.0'
}

How to use

示例 Lrc:
<com.d.lib.ui.view.lrc.LrcView
    ohos:id="$+id:lrcv_lrc"
    ohos:height="match_parent"
    ohos:width="match_parent"
    ohos:above="$id:sb_progress"
    ohos:below="$id:tl_title"
    ohos:scrollable="true"
    ohos:left_margin="12fp"
    ohos:right_margin="12fp"
    app:lib_ui_view_lrc_maxScale="1.7f"
    app:lib_ui_view_lrc_minScale="0.7f"
    app:lib_ui_view_lrc_padding="17vp"
    app:lib_ui_view_lrc_textColor="#000000"
    app:lib_ui_view_lrc_textColorCur="#108577"
    app:lib_ui_view_lrc_textSize="15vp"
    app:lib_ui_view_lrc_textSizeCur="17vp"
    app:lib_ui_view_lrc_timeColor="#000000"
    app:lib_ui_view_lrc_timeSize="8vp"/>

示例 sort:

     <com.d.lib.ui.view.sort.SideBar
        ohos:id="$+id:sb_sidebar"
        ohos:height="match_parent"
        ohos:width="match_parent"
        app:lib_ui_view_sidebar_type="0"/>

示例 Tick:

 <com.d.ui.view.tick.CTickViewLayout
    ohos:id="$+id:ctickView"
    ohos:height="match_content"
    ohos:margin="12vp"
    ohos:width="match_parent"
    ohos:orientation="vertical"/>

示例 Toggle:

<com.d.lib.common.widget.toggle.ToggleButton
    ohos:id="$+id:swit1"
    ohos:height="32vp"
    ohos:width="60vp"
    ohos:margin="12fp"
    app:lib_pub_tbtn_colorPadding="#e3e4e5"
    app:lib_pub_tbtn_colorThumb="#ffffff"
    app:lib_pub_tbtn_colorTrackOff="#ffffff"
    app:lib_pub_tbtn_colorTrackOpen="#008577"
    app:lib_pub_tbtn_duration="250"
    app:lib_pub_tbtn_padding="1.5fp"/>

示例 Reply Background:

<com.d.lib.ui.view.replybg.ReplyBgView
    ohos:height="45vp"
    ohos:width="105vp"
    ohos:margin="12vp"
    app:lib_ui_view_replybv_color="#008577"
    app:lib_ui_view_replybv_gravity="left"
    app:lib_ui_view_replybv_offset="-8vp"
    app:lib_ui_view_replybv_radius="6vp"
    app:lib_ui_view_replybv_trgHeight="8vp"
    app:lib_ui_view_replybv_trgWidth="18vp"/>

示例 Reply Background:

<com.d.lib.ui.view.replybg.ReplyBgView
    ohos:height="45vp"
    ohos:width="105vp"
    ohos:margin="12vp"
    app:lib_ui_view_replybv_color="#008577"
    app:lib_ui_view_replybv_gravity="left"
    app:lib_ui_view_replybv_offset="-8vp"
    app:lib_ui_view_replybv_radius="6vp"
    app:lib_ui_view_replybv_trgHeight="8vp"
    app:lib_ui_view_replybv_trgWidth="18vp"/>

示例 Hole Background:

<com.d.lib.ui.view.stroke.HoleBgView
    ohos:width="match_parent"
    ohos:height="190fp"
    ohos:margin="12fp"/>

示例 ArcMenu:

    <com.d.lib.ui.layout.arcmenu.ArcMenu
        ohos:width="match_parent"
        ohos:height="150vp"
        ohos:align_parent_bottom="true"
        ohos:left_margin="12vp"
        ohos:bottom_margin="12vp"
        app:lib_ui_layout_am_position="1"
        app:lib_ui_layout_am_radius="90vp">

示例 Heart:

    <com.d.lib.ui.layout.heartlayout.TCHeartLayout
        ohos:id="$+id:tch_pr"
        ohos:height="match_parent"
        ohos:width="150vp"
        ohos:above="$id:btn_click"
        ohos:align_parent_right="true"/>

示例 Progress:

            <com.d.lib.ui.view.progress.SettingProgressView
                ohos:id="$+id:spv_level"
                ohos:width="match_parent"
                ohos:height="50fp"
                app:lib_ui_view_spv_colorSelect="#008577"
                app:lib_ui_view_spv_colorUnselect="#d8d8d8"
                app:lib_ui_view_spv_count="5"
                app:lib_ui_view_spv_radiusBig="13fp"
                app:lib_ui_view_spv_radiusSmall="4fp"
                app:lib_ui_view_spv_radiusSpace="0"/>

示例 Praise:

<com.d.lib.ui.layout.praise.PraiseLayout
    ohos:id="$+id:pl_praise"
    ohos:left_margin="135vp"
    ohos:height="match_parent"
    ohos:width="match_content"/>

示例 Shadow:

   <com.d.lib.ui.layout.shadow.ShadowLayout
          ohos:height="match_content"
          ohos:width="match_content"
          ohos:margin="15fp"
          ohos:padding="15fp"
          app:lib_ui_layout_sl_shadowAngle="90"
          app:lib_ui_layout_sl_shadowColor="#97E9EF"
          app:lib_ui_layout_sl_shadowDistance="3fp"
          app:lib_ui_layout_sl_shadowRadius="25fp"
          app:lib_ui_layout_sl_shadowed="true"
          >

示例 RecordTrigger:

   <com.d.lib.ui.view.recordtrigger.RecordLightView
    ohos:id="$+id:rlv_light"
    ohos:center_in_parent="true"
    ohos:height="match_content"
    ohos:width="match_content"
    ohos:visibility="hide"/>

示例 ClockSet:

  <com.d.lib.ui.view.clock.ClockSetView
        ohos:id="$+id:csv_clockset"
        ohos:width="220vp"
        ohos:height="220vp"
        ohos:top_margin="12vp"
        ohos:bottom_margin="12vp"/>

示例 AdvertSwitcher:

<com.d.lib.ui.view.advertswitcher.AdvertSwitcher
    ohos:id="$+id:as_advert_img"
    ohos:width="match_parent"
    ohos:height="95vp">

    <Text
        ohos:width="match_content"
        ohos:height="match_parent"
        ohos:layout_alignment="vertical_center"
        ohos:right_padding="12vp"
        ohos:text_color="#FF0000"
        ohos:text="Host 0"
        ohos:text_size="16fp"
        ohos:text_weight="700"/>

    <Text
        ohos:width="match_content"
        ohos:height="match_parent"
        ohos:layout_alignment="vertical_center"
        ohos:right_padding="12vp"
        ohos:text_color="#FF0000"
        ohos:text="Host 1"
        ohos:text_size="16fp"
        ohos:text_weight="700"/>

    <Text
        ohos:width="match_content"
        ohos:height="match_parent"
        ohos:layout_alignment="vertical_center"
        ohos:right_padding="12vp"
        ohos:text_color="#FF0000"
        ohos:text="Host 2"
        ohos:text_size="16fp"
        ohos:text_weight="700"/>

</com.d.lib.ui.view.advertswitcher.AdvertSwitcher>

示例 FlowLayout:

 <com.d.lib.ui.view.flowlayout.FlowLayout
    ohos:id="$+id:fl_flow"
    ohos:height="match_content"
    ohos:width="match_parent"
    app:lib_ui_view_flow_dividerHeight="6vp"
    app:lib_ui_view_flow_dividerWidth="6vp"
    app:lib_ui_view_flow_paddingBottom="12vp"
    app:lib_ui_view_flow_paddingLeft="12vp"
    app:lib_ui_view_flow_paddingRight="12vp"
    app:lib_ui_view_flow_paddingTop="12vp"/>

示例 Banner:

  <com.d.lib.ui.layout.convenientbanner.ConvenientBanner
    ohos:id="$+id:cb_banner_vertical"
    ohos:width="match_parent"
    ohos:height="165vp"
    app:lib_ui_layout_cb_layout="1"/>

Licence

Copyright 2017 D

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.

空文件

简介

UIUtil 是一些UI小组件集合的库 展开 收起
Java
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/ts_ohos/UIUtil.git
git@gitee.com:ts_ohos/UIUtil.git
ts_ohos
UIUtil
UIUtil
master

搜索帮助