代码拉取完成,页面将自动刷新
同步操作将从 luo_ou/BGAProgressBar-Android 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
1.无法显示进度 - 必须设置「style」为「@android:style/Widget.ProgressBar.Horizontal」
style="@android:style/Widget.ProgressBar.Horizontal"
点击下载 BGAProgressBarDemo.apk 或扫描下面的二维码安装
bga-progressbar 后面的「latestVersion」指的是左边这个 Download 徽章后面的「数字」,请自行替换。请不要再来问我「latestVersion」是什么了
dependencies {
implementation 'cn.bingoogolapple:bga-progressbar:latestVersion@aar'
}
<cn.bingoogolapple.progressbar.BGAProgressBar
style="@android:style/Widget.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/gap"
android:padding="15dp"
android:progress="40"
app:bga_pb_isCapRounded="false"
app:bga_pb_isHiddenText="true"
app:bga_pb_mode="horizontal"
app:bga_pb_reachedColor="#FFC73B"
app:bga_pb_reachedHeight="4dp"
app:bga_pb_textColor="#FFC73B"
app:bga_pb_textMargin="8dp"
app:bga_pb_textSize="14sp"
app:bga_pb_unReachedColor="#ECF0F1"
app:bga_pb_unReachedHeight="2dp"/>
<declare-styleable name="BGAProgressBar">
<!-- 进度条样式,默认值为 system -->
<attr name="bga_pb_mode" format="enum">
<!-- 系统自带样式 -->
<enum name="system" value="0"/>
<!-- 水平进度条 -->
<enum name="horizontal" value="1"/>
<!-- 圆形进度条 -->
<enum name="circle" value="2"/>
<!-- 彗星进度条 -->
<enum name="comet" value="3"/>
<!-- 水波纹进度条 -->
<enum name="wave" value="4"/>
</attr>
<!-- 文字颜色,默认值为 #70A800 -->
<attr name="bga_pb_textColor" format="reference|color"/>
<!-- 文字大小,默认值为 10sp -->
<attr name="bga_pb_textSize" format="dimension"/>
<!-- 文字和进度条之间的间距,默认值为 4dp -->
<attr name="bga_pb_textMargin" format="dimension"/>
<!-- 已完成进度的颜色,默认值为 #70A800 -->
<attr name="bga_pb_reachedColor" format="reference|color"/>
<!-- 已完成进度的高度,默认值为 2dp -->
<attr name="bga_pb_reachedHeight" format="dimension"/>
<!-- 未完成进度的颜色,默认值为 #CCCCCC -->
<attr name="bga_pb_unReachedColor" format="reference|color"/>
<!-- 未完成进度的高度,默认值为 1dp -->
<attr name="bga_pb_unReachedHeight" format="dimension"/>
<!-- 是否为圆角,默认值为 false -->
<attr name="bga_pb_isCapRounded" format="boolean"/>
<!-- 是否隐藏文字,默认值为 false -->
<attr name="bga_pb_isHiddenText" format="boolean"/>
<!-- 圆形进度条半径,默认值为 16dp -->
<attr name="bga_pb_radius" format="dimension"/>
</declare-styleable>
新浪微博 | 个人主页 | 邮箱 | BGA系列开源库QQ群 |
---|---|---|---|
bingoogolapple | bingoogolapple.cn | bingoogolapple@gmail.com |
如果您觉得 BGA 系列开源库帮你节省了大量的开发时间,请扫描下方的二维码随意打赏,要是能打赏个 10.24 :monkey_face:就太:thumbsup:了。您的支持将鼓励我继续创作:octocat:
如果您目前正打算购买通往墙外的梯子,可以使用我的邀请码「YFQ9Q3B」购买 Lantern,双方都赠送三个月的专业版使用时间
Copyright 2016 bingoogolapple
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.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。