{"id":420,"date":"2020-05-15T13:20:47","date_gmt":"2020-05-15T05:20:47","guid":{"rendered":"https:\/\/badgameshow.com\/fly\/?p=420"},"modified":"2020-05-19T11:50:31","modified_gmt":"2020-05-19T03:50:31","slug":"github-%e5%a5%bd%e7%94%a8%e5%88%86%e4%ba%abandroid-colorpicker%e9%a1%8f%e8%89%b2%e9%81%b8%e6%93%87%e5%99%a8","status":"publish","type":"post","link":"https:\/\/badgameshow.com\/fly\/github-%e5%a5%bd%e7%94%a8%e5%88%86%e4%ba%abandroid-colorpicker%e9%a1%8f%e8%89%b2%e9%81%b8%e6%93%87%e5%99%a8\/","title":{"rendered":"Github \u597d\u7528\u5206\u4eabAndroid ColorPicker(\u984f\u8272\u9078\u64c7\u5668)"},"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.github.dhaval2404:colorpicker:1.1'\n}\n<\/code><\/pre>\n<h3>2.\u7a0b\u5f0f\u78bc\u7bc4\u4f8b<\/h3>\n<h4>a.layout\u8072\u660ecom.github.dhaval2404.colorpicker.ColorPickerView<\/h4>\n<pre><code class=\"language-XML line-numbers\">&lt;com.github.dhaval2404.colorpicker.ColorPickerView\n    android:id=\"@+id\/colorPick\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"\/&gt;\n<\/code><\/pre>\n<h4>b.\u5be6\u4f5cColorListener<\/h4>\n<pre><code class=\"language-Java line-numbers\">colorPick.setColorListener { colorInt, colorHex -&gt;\n     Toast.makeText(this, \"<span class=\"katex math inline\">colorInt<\/span>colorHex\", Toast.LENGTH_SHORT).show()\n     add.setBackgroundColor(colorInt)\n }\n<\/code><\/pre>\n<h3>4.\u6548\u679c\u5c55\u793a<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/badgameshow.com\/fly\/wp-content\/uploads\/2020\/05\/42.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":[73,56,15],"class_list":["post-420","post","type-post","status-publish","format-standard","hentry","category-github","tag-colorpicker","tag-github","tag-kotlin"],"_links":{"self":[{"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts\/420","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=420"}],"version-history":[{"count":6,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts\/420\/revisions"}],"predecessor-version":[{"id":427,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts\/420\/revisions\/427"}],"wp:attachment":[{"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/media?parent=420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/categories?post=420"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/tags?post=420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}