android实现圆弧(或直线)进度框 可包裹任意layout或单个imageview

上传者: zmforever | 上传时间: 2021-06-16 12:28:11 | 文件大小: 684KB | 文件类型: ZIP
在棋牌游戏开发过程中遇到了这样的一个需求: 需要在一个LAYOUT层外边实现进度的显示实现时钟的功能。 在github上面搜到了android-square-progressbar这个项目,可实现在图片周围显示进度。demo地址: https://play.google.com/store/apps/details?id=net.yscs.android.square_progressbar_example 这个项目是实现一个图片下载的进度,我稍作修改,用一个linearLayout取代了imgaview 也没有问题,唯一的遗憾是四个角没有圆弧效果。 研究一番,熟悉了这个demo的实现原理: 其实就是用canvas.drawPath方法根据当前进度动态计算绘制四条边,实现一个进度条效果。 于是我决定将这个项目的绘制稍作修改,用四个半圆弧绘制四个角,然后用再用四条直线连接这四个圆弧。

文件下载

资源详情

[{"title":"( 50 个子文件 684KB ) android实现圆弧(或直线)进度框 可包裹任意layout或单个imageview","children":[{"title":"android-square-progressbar-example","children":[{"title":"AndroidManifest.xml <span style='color:#111;'> 964B </span>","children":null,"spread":false},{"title":"res","children":[{"title":"layout","children":[{"title":"lv_github.xml <span style='color:#111;'> 922B </span>","children":null,"spread":false},{"title":"lv_style.xml <span style='color:#111;'> 986B </span>","children":null,"spread":false},{"title":"progressbarview.xml <span style='color:#111;'> 3.17KB </span>","children":null,"spread":false},{"title":"lv_header_layout.xml <span style='color:#111;'> 1.16KB </span>","children":null,"spread":false},{"title":"lv_colour.xml <span style='color:#111;'> 1.29KB </span>","children":null,"spread":false},{"title":"lv_signer.xml <span style='color:#111;'> 1.00KB </span>","children":null,"spread":false},{"title":"percentdialog.xml <span style='color:#111;'> 4.33KB </span>","children":null,"spread":false},{"title":"lv_image.xml <span style='color:#111;'> 1.22KB </span>","children":null,"spread":false},{"title":"activity_main.xml <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"lv_style_box.xml <span style='color:#111;'> 1.69KB </span>","children":null,"spread":false},{"title":"square_layout.xml <span style='color:#111;'> 3.72KB </span>","children":null,"spread":false}],"spread":false},{"title":"drawable-ldpi","children":null,"spread":false},{"title":"drawable-mdpi","children":[{"title":"sqbicon.png <span style='color:#111;'> 1.23KB </span>","children":null,"spread":false}],"spread":true},{"title":"values-sw600dp","children":[{"title":"dimens.xml <span style='color:#111;'> 195B </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-hdpi","children":[{"title":"millennium_stadium.jpg <span style='color:#111;'> 33.36KB </span>","children":null,"spread":false},{"title":"ic_drawer.png <span style='color:#111;'> 2.78KB </span>","children":null,"spread":false},{"title":"edinburgh.jpg <span style='color:#111;'> 36.16KB </span>","children":null,"spread":false},{"title":"holyroodpark.jpg <span style='color:#111;'> 37.24KB </span>","children":null,"spread":false},{"title":"sqbicon.png <span style='color:#111;'> 1.90KB </span>","children":null,"spread":false},{"title":"city.jpg <span style='color:#111;'> 21.45KB </span>","children":null,"spread":false},{"title":"drawer_shadow.9.png <span style='color:#111;'> 171B </span>","children":null,"spread":false}],"spread":true},{"title":"values-sw720dp-land","children":[{"title":"dimens.xml <span style='color:#111;'> 268B </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-xhdpi","children":[{"title":"player_2.png <span style='color:#111;'> 4.50KB </span>","children":null,"spread":false},{"title":"head_def.jpg <span style='color:#111;'> 12.55KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-xxhdpi","children":[{"title":"player_2.png <span style='color:#111;'> 4.50KB </span>","children":null,"spread":false},{"title":"money_flag.png <span style='color:#111;'> 3.27KB </span>","children":null,"spread":false},{"title":"head_def.jpg <span style='color:#111;'> 12.55KB </span>","children":null,"spread":false},{"title":"sqbicon.png <span style='color:#111;'> 4.33KB </span>","children":null,"spread":false}],"spread":true},{"title":"values","children":[{"title":"strings.xml <span style='color:#111;'> 1.35KB </span>","children":null,"spread":false},{"title":"colors.xml <span style='color:#111;'> 334B </span>","children":null,"spread":false},{"title":"dimens.xml <span style='color:#111;'> 855B </span>","children":null,"spread":false},{"title":"styles.xml <span style='color:#111;'> 2.73KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"src","children":[{"title":"net","children":[{"title":"yscs","children":[{"title":"android","children":[{"title":"square_progressbar","children":[{"title":"utils","children":[{"title":"PercentStyle.java <span style='color:#111;'> 876B </span>","children":null,"spread":false},{"title":"ColourUtil.java <span style='color:#111;'> 698B </span>","children":null,"spread":false},{"title":"CalculationUtil.java <span style='color:#111;'> 339B </span>","children":null,"spread":false}],"spread":true},{"title":"SquareProgressView.java <span style='color:#111;'> 14.31KB </span>","children":null,"spread":false},{"title":"SquareProgressBar.java <span style='color:#111;'> 8.63KB </span>","children":null,"spread":false}],"spread":true},{"title":"square_progressbar_example","children":[{"title":"MainActivity.java <span style='color:#111;'> 11.90KB </span>","children":null,"spread":false},{"title":"SquareFragment.java <span style='color:#111;'> 2.64KB </span>","children":null,"spread":false},{"title":"PercentDialog.java <span style='color:#111;'> 4.71KB </span>","children":null,"spread":false},{"title":"PreviewView.java <span style='color:#111;'> 1.97KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":".classpath <span style='color:#111;'> 475B </span>","children":null,"spread":false},{"title":"assets","children":null,"spread":false},{"title":"project.properties <span style='color:#111;'> 563B </span>","children":null,"spread":false},{"title":"sqbicon_web.png <span style='color:#111;'> 20.78KB </span>","children":null,"spread":false},{"title":".settings","children":[{"title":"com.google.gwt.eclipse.core.prefs <span style='color:#111;'> 54B </span>","children":null,"spread":false},{"title":"org.eclipse.jdt.core.prefs <span style='color:#111;'> 587B </span>","children":null,"spread":false},{"title":"com.google.gdt.eclipse.core.prefs <span style='color:#111;'> 91B </span>","children":null,"spread":false}],"spread":true},{"title":"libs","children":[{"title":"android-support-v4.jar <span style='color:#111;'> 543.16KB </span>","children":null,"spread":false}],"spread":true},{"title":".project <span style='color:#111;'> 911B </span>","children":null,"spread":false},{"title":"lint.xml <span style='color:#111;'> 53B </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

  • lwg255 :
    有用
    2018-02-02
  • sinat_32871111 :
    用不到啊,就是在一个图片走遍画了一条会动的线
    2016-07-22

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明