{"id":715,"date":"2020-07-22T16:15:59","date_gmt":"2020-07-22T08:15:59","guid":{"rendered":"https:\/\/badgameshow.com\/fly\/?p=715"},"modified":"2020-07-22T16:48:12","modified_gmt":"2020-07-22T08:48:12","slug":"github-%e5%a5%bd%e7%94%a8%e5%88%86%e4%ba%abandroid-circleprogressbar%e5%9c%93%e5%bd%a2%e9%80%b2%e5%ba%a6%e6%a2%9d","status":"publish","type":"post","link":"https:\/\/badgameshow.com\/fly\/github-%e5%a5%bd%e7%94%a8%e5%88%86%e4%ba%abandroid-circleprogressbar%e5%9c%93%e5%bd%a2%e9%80%b2%e5%ba%a6%e6%a2%9d\/","title":{"rendered":"Github \u597d\u7528\u5206\u4eabAndroid CircleProgressBar(\u5713\u5f62\u9032\u5ea6\u689d)"},"content":{"rendered":"<h3>1.\u5148\u5c0e\u5165\u51fd\u793a\u5eab(build.gradle: Module)<\/h3>\n<pre><code class=\"language-Gradle line-numbers\">dependencies {\n   implementation 'com.dinuscxj:circleprogressbar:1.3.6'\n}\n<\/code><\/pre>\n<h3>2.\u7a0b\u5f0f\u78bc\u7bc4\u4f8b<\/h3>\n<h4>a.Layout<\/h4>\n<pre><code class=\"language-XML line-numbers\">&lt;com.dinuscxj.progressbar.CircleProgressBar\n    android:id=\"@+id\/circle_bar\"\n    android:layout_width=\"50dp\"\n    android:layout_height=\"50dp\"\n    app:layout_constraintBottom_toBottomOf=\"parent\"\n    app:layout_constraintEnd_toEndOf=\"parent\"\n    app:layout_constraintStart_toStartOf=\"parent\"\n    app:layout_constraintTop_toTopOf=\"parent\" \/&gt;\n<\/code><\/pre>\n<h4>b.\u8a2d\u7f6e\u52d5\u756b<\/h4>\n<pre><code class=\"language-Kotlin line-numbers\">val animator = ValueAnimator.ofInt(0, 101)\nanimator.addUpdateListener {\n    val progress = it.animatedValue as Int\n    circle_bar.progress = progress\n}\nanimator.repeatCount = ValueAnimator.INFINITE\nanimator.duration = 4000\nanimator.start()\n<\/code><\/pre>\n<h3>3.\u6548\u679c\u5c55\u793a<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/badgameshow.com\/fly\/wp-content\/uploads\/2020\/07\/circleprogressbar.gif\" alt=\"\" \/><\/p>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>1.\u5148\u5c0e\u5165\u51fd\u793a\u5eab(build.gradle: Module) dependencies { implement &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"pgc_sgb_lightbox_settings":"","footnotes":""},"categories":[57],"tags":[113,56,15],"class_list":["post-715","post","type-post","status-publish","format-standard","hentry","category-github","tag-circleprogressbar","tag-github","tag-kotlin"],"_links":{"self":[{"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts\/715","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/comments?post=715"}],"version-history":[{"count":4,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts\/715\/revisions"}],"predecessor-version":[{"id":721,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts\/715\/revisions\/721"}],"wp:attachment":[{"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/media?parent=715"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/categories?post=715"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/tags?post=715"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}