{"id":417,"date":"2020-05-15T11:50:59","date_gmt":"2020-05-15T03:50:59","guid":{"rendered":"https:\/\/badgameshow.com\/fly\/?p=417"},"modified":"2020-05-19T12:00:22","modified_gmt":"2020-05-19T04:00:22","slug":"github-%e5%a5%bd%e7%94%a8%e5%88%86%e4%ba%abandroid-sheetselection%e5%ba%95%e4%b8%8b%e5%bd%88%e8%b7%b3%e8%a6%96%e7%aa%97","status":"publish","type":"post","link":"https:\/\/badgameshow.com\/fly\/github-%e5%a5%bd%e7%94%a8%e5%88%86%e4%ba%abandroid-sheetselection%e5%ba%95%e4%b8%8b%e5%bd%88%e8%b7%b3%e8%a6%96%e7%aa%97\/","title":{"rendered":"Github \u597d\u7528\u5206\u4eabAndroid SheetSelection(\u5e95\u4e0b\u5f48\u8df3\u8996\u7a97)"},"content":{"rendered":"<h3>1.\u5148\u5c0e\u5165\u51fd\u793a\u5eab(build.gradle: Project)<\/h3>\n<pre><code class=\"language-Gradle line-numbers\">allprojects {\n  repositories { \n     maven { url 'https:\/\/jitpack.io' }\n   }\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.minibugdev:sheetselection:0.0.2'\n}\n<\/code><\/pre>\n<h3>3.\u7a0b\u5f0f\u78bc\u7bc4\u4f8b<\/h3>\n<h4>a.\u5275\u5efa\u8981\u986f\u793a\u8cc7\u6599<\/h4>\n<pre><code class=\"language-Kotlin line-numbers\">private val items = listOf(\n    SheetSelectionItem(\"1\", \"\u7b2c\u4e00\u5f35\", R.drawable.a),\n    SheetSelectionItem(\"2\", \"\u7b2c\u4e8c\u5f35\", R.drawable.b),\n    SheetSelectionItem(\"3\", \"\u7b2c\u4e09\u5f35\", R.drawable.c)\n)\n<\/code><\/pre>\n<h4>b.\u5275\u5efa\u9078\u55ae<\/h4>\n<pre><code class=\"language-Kotlin line-numbers\">SheetSelection.Builder(this)\n        .title(\"\u9078\u55ae\")\n        .items(items)\n        .theme(R.style.Theme_Custom_SheetSelection)\n        .showDraggedIndicator(true)\n        .onItemClickListener { item, position -&gt;\n            Toast.makeText(this, \"<span class=\"katex math inline\">item<\/span>position\", Toast.LENGTH_SHORT).show()\n        }.show()\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\/40.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) allprojects { repositor &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":[56,15,72],"class_list":["post-417","post","type-post","status-publish","format-standard","hentry","category-github","tag-github","tag-kotlin","tag-sheetselection"],"_links":{"self":[{"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts\/417","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=417"}],"version-history":[{"count":3,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts\/417\/revisions"}],"predecessor-version":[{"id":429,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts\/417\/revisions\/429"}],"wp:attachment":[{"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/media?parent=417"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/categories?post=417"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/tags?post=417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}