代码拉取完成,页面将自动刷新
本项目是基于开源项目UIUtil进行harmonyos化的移植和开发的,可以通过项目标签以及 github地址
移植版本:源master版本(5306103 on 10 Jan)
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, …
可以先下载项目,将项目中的lib_common库,lib_layout库,lib_view库提取出来放在所需项目中通过build配置
dependencies {
implementation project(":lib_common")
implementation project(":lib_layout")
implementation project(":lib_view")
}
buildscript {
repositories {
...
mavenCentral()
}
...
}
allprojects {
repositories {
...
mavenCentral()
}
}
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'
}
示例 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"/>
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.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。