{"id":547,"date":"2020-06-10T11:01:07","date_gmt":"2020-06-10T03:01:07","guid":{"rendered":"https:\/\/badgameshow.com\/fly\/?p=547"},"modified":"2020-07-07T11:56:24","modified_gmt":"2020-07-07T03:56:24","slug":"github-%e5%a5%bd%e7%94%a8%e5%88%86%e4%ba%abandroid-fancygifdialog-androidgif%e5%b0%8d%e8%a9%b1%e6%a1%86","status":"publish","type":"post","link":"https:\/\/badgameshow.com\/fly\/github-%e5%a5%bd%e7%94%a8%e5%88%86%e4%ba%abandroid-fancygifdialog-androidgif%e5%b0%8d%e8%a9%b1%e6%a1%86\/","title":{"rendered":"Github \u597d\u7528\u5206\u4eabAndroid FancyGifDialog-Android(GIF\u5c0d\u8a71\u6846)"},"content":{"rendered":"<h3>1.\u5148\u5c0e\u5165\u51fd\u793a\u5eab(build.gradle: Project)<\/h3>\n<pre><code class=\"language-Gradle line-numbers\">repositories {\n    maven { url 'https:\/\/jitpack.io' }\n}\n<\/code><\/pre>\n<h3>2.\u5148\u5c0e\u5165\u51fd\u793a\u5eab(build.gradle: Module)<\/h3>\n<pre><code class=\"language-Gradle line-numbers\">dependencies {\n   implementation 'com.github.Shashank02051997:FancyGifDialog-Android:1.2'\n}\n<\/code><\/pre>\n<h3>3.\u7a0b\u5f0f\u78bc\u7bc4\u4f8b<\/h3>\n<h4>a.layout<\/h4>\n<pre><code class=\"language-XML line-numbers\"> &lt;Button\n        android:id=\"@+id\/open\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"\u958b\u555f\u5c0d\u8a71\u6846\"\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.\u5275\u5efa\u5c0d\u8a71\u6846<\/h4>\n<pre><code class=\"language-Kotlin line-numbers\"> open.setOnClickListener {\n            FancyGifDialog.Builder(this)\n                .setTitle(\"\u6211\u662f\u6a19\u984c\")\n                .setMessage(\"\u6211\u662f\u8a0a\u606f\")\n                .setNegativeBtnText(\"\u53d6\u6d88\")\n                .setPositiveBtnText(\"\u78ba\u5b9a\")\n                .setNegativeBtnBackground(\"#ff0000\")\n                .setPositiveBtnBackground(\"#ff00ff\")\n                .setGifResource(R.drawable.giphy)\n                .isCancellable(false)\n                .OnPositiveClicked {\n                    Toast.makeText(this, \"\u78ba\u5b9a\", Toast.LENGTH_SHORT).show()\n                }\n                .OnNegativeClicked {\n                    Toast.makeText(this, \"\u53d6\u6d88\", Toast.LENGTH_SHORT).show()\n                }.build()\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\/06\/FancyGifDialog-Android.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: Project) repositories { maven {  &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":[79,56,15],"class_list":["post-547","post","type-post","status-publish","format-standard","hentry","category-github","tag-fancygifdialog-android","tag-github","tag-kotlin"],"_links":{"self":[{"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts\/547","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=547"}],"version-history":[{"count":1,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts\/547\/revisions"}],"predecessor-version":[{"id":551,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts\/547\/revisions\/551"}],"wp:attachment":[{"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/media?parent=547"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/categories?post=547"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/tags?post=547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}