{"id":84,"date":"2020-12-15T10:13:02","date_gmt":"2020-12-15T02:13:02","guid":{"rendered":"http:\/\/wthee.xyz\/?p=84"},"modified":"2021-01-06T15:20:37","modified_gmt":"2021-01-06T07:20:37","slug":"android-recyclerview-%e5%88%86%e7%bb%84%e6%98%be%e7%a4%ba","status":"publish","type":"post","link":"https:\/\/wthee.xyz\/index.php\/2020\/12\/15\/android-recyclerview-%e5%88%86%e7%bb%84%e6%98%be%e7%a4%ba\/","title":{"rendered":"Android RecyclerView \u5206\u7ec4\u663e\u793a"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_38 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<span class=\"ez-toc-title-toggle\"><a class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" style=\"display: none;\"><span style=\"display: flex;align-items: center;width: 35px;height: 30px;justify-content: center;\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/wthee.xyz\/index.php\/2020\/12\/15\/android-recyclerview-%e5%88%86%e7%bb%84%e6%98%be%e7%a4%ba\/#%E5%AE%9E%E7%8E%B0%E6%95%88%E6%9E%9C\" title=\"\u5b9e\u73b0\u6548\u679c\">\u5b9e\u73b0\u6548\u679c<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/wthee.xyz\/index.php\/2020\/12\/15\/android-recyclerview-%e5%88%86%e7%bb%84%e6%98%be%e7%a4%ba\/#%E6%BA%90%E7%A0%81%E5%9C%B0%E5%9D%80\" title=\"\u6e90\u7801\u5730\u5740\">\u6e90\u7801\u5730\u5740<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/wthee.xyz\/index.php\/2020\/12\/15\/android-recyclerview-%e5%88%86%e7%bb%84%e6%98%be%e7%a4%ba\/#%E5%B8%83%E5%B1%80%E6%96%87%E4%BB%B6\" title=\"\u5e03\u5c40\u6587\u4ef6\">\u5e03\u5c40\u6587\u4ef6<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/wthee.xyz\/index.php\/2020\/12\/15\/android-recyclerview-%e5%88%86%e7%bb%84%e6%98%be%e7%a4%ba\/#%E6%95%B0%E6%8D%AE%E7%B1%BB\" title=\"\u6570\u636e\u7c7b\">\u6570\u636e\u7c7b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/wthee.xyz\/index.php\/2020\/12\/15\/android-recyclerview-%e5%88%86%e7%bb%84%e6%98%be%e7%a4%ba\/#%E5%88%97%E8%A1%A8%E9%A1%B9%E5%AF%86%E5%B0%81%E7%B1%BB\" title=\"\u5217\u8868\u9879\u5bc6\u5c01\u7c7b\">\u5217\u8868\u9879\u5bc6\u5c01\u7c7b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/wthee.xyz\/index.php\/2020\/12\/15\/android-recyclerview-%e5%88%86%e7%bb%84%e6%98%be%e7%a4%ba\/#%E5%88%97%E8%A1%A8%E9%80%82%E9%85%8D%E5%99%A8\" title=\"\u5217\u8868\u9002\u914d\u5668\">\u5217\u8868\u9002\u914d\u5668<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/wthee.xyz\/index.php\/2020\/12\/15\/android-recyclerview-%e5%88%86%e7%bb%84%e6%98%be%e7%a4%ba\/#%E5%8A%A0%E8%BD%BD%E6%95%B0%E6%8D%AE\" title=\"\u52a0\u8f7d\u6570\u636e\">\u52a0\u8f7d\u6570\u636e<\/a><\/li><\/ul><\/nav><\/div>\n<h4><span class=\"ez-toc-section\" id=\"%E5%AE%9E%E7%8E%B0%E6%95%88%E6%9E%9C\"><\/span>\u5b9e\u73b0\u6548\u679c<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/i0.wp.com\/wthee.xyz\/wp-content\/uploads\/2020\/12\/S01215-100007451.png?resize=193%2C300&#038;ssl=1\" alt=\"\u6548\u679c\" data-recalc-dims=\"1\" \/><\/p>\n<h4><span class=\"ez-toc-section\" id=\"%E6%BA%90%E7%A0%81%E5%9C%B0%E5%9D%80\"><\/span>\u6e90\u7801\u5730\u5740<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li><a href=\"https:\/\/github.com\/wthee\/RecyclerViewHeader\">https:\/\/github.com\/wthee\/RecyclerViewHeader<\/a><\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"%E5%B8%83%E5%B1%80%E6%96%87%E4%BB%B6\"><\/span>\u5e03\u5c40\u6587\u4ef6<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li>activity_main.xml<\/li>\n<\/ul>\n<pre><code class=\"\" data-line=\"\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;\n&lt;androidx.constraintlayout.widget.ConstraintLayout xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;\n    xmlns:app=&quot;http:\/\/schemas.android.com\/apk\/res-auto&quot;\n    xmlns:tools=&quot;http:\/\/schemas.android.com\/tools&quot;\n    android:layout_width=&quot;match_parent&quot;\n    android:layout_height=&quot;match_parent&quot;\n    tools:context=&quot;.MainActivity&quot;&gt;\n\n    &lt;androidx.recyclerview.widget.RecyclerView\n        android:id=&quot;@+id\/list&quot;\n        android:layout_width=&quot;match_parent&quot;\n        android:layout_height=&quot;wrap_content&quot;\n        app:layout_constraintTop_toTopOf=&quot;parent&quot;\n        android:orientation=&quot;vertical&quot;\n        app:layoutManager=&quot;androidx.recyclerview.widget.LinearLayoutManager&quot;\n        tools:listitem=&quot;@layout\/item_content&quot; \/&gt;\n&lt;\/androidx.constraintlayout.widget.ConstraintLayout&gt;<\/code><\/pre>\n<ul>\n<li>item_header.xml \u5217\u8868\u5206\u7ec4\u5934\u90e8<\/li>\n<\/ul>\n<pre><code class=\"\" data-line=\"\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;\n&lt;com.google.android.material.textview.MaterialTextView xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;\n    xmlns:app=&quot;http:\/\/schemas.android.com\/apk\/res-auto&quot;\n    xmlns:tools=&quot;http:\/\/schemas.android.com\/tools&quot;\n    android:id=&quot;@+id\/header&quot;\n    android:layout_width=&quot;match_parent&quot;\n    android:layout_height=&quot;wrap_content&quot;\n    android:gravity=&quot;start&quot;\n    android:textAppearance=&quot;@style\/TextAppearance.MaterialComponents.Headline5&quot;\n    app:layout_constraintTop_toTopOf=&quot;parent&quot;\n    tools:text=&quot;header&quot; \/&gt;<\/code><\/pre>\n<ul>\n<li>item_content.xml \u5217\u8868\u9879<\/li>\n<\/ul>\n<pre><code class=\"\" data-line=\"\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;\n&lt;com.google.android.material.textview.MaterialTextView xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;\n    xmlns:app=&quot;http:\/\/schemas.android.com\/apk\/res-auto&quot;\n    xmlns:tools=&quot;http:\/\/schemas.android.com\/tools&quot;\n    android:id=&quot;@+id\/content&quot;\n    android:layout_width=&quot;match_parent&quot;\n    android:layout_height=&quot;wrap_content&quot;\n    android:gravity=&quot;center&quot;\n    tools:text=&quot;content&quot;\n    app:layout_constraintTop_toTopOf=&quot;parent&quot; \/&gt;<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"%E6%95%B0%E6%8D%AE%E7%B1%BB\"><\/span>\u6570\u636e\u7c7b<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li>MockData<\/li>\n<\/ul>\n<pre><code class=\"\" data-line=\"\">package cn.wthee.recyclerviewheader.data\n\nimport java.util.*\nimport kotlin.collections.ArrayList\n\ndata class MockData(\n    val type: String,\n    val contents: List&lt;MockContent&gt;\n)\n\ndata class MockContent(\n    val id: Long,\n    val data: String\n)\n\n\/\/ \u6a21\u62df\u6570\u636e\nfun loadData(): ArrayList&lt;MockData&gt; {\n    val list = arrayListOf&lt;MockData&gt;()\n    for (i in 0..20) {\n        val contents = arrayListOf&lt;MockContent&gt;()\n        for (j in 0 .. Random(System.currentTimeMillis()).nextInt(20)) {\n            contents.add(MockContent(System.currentTimeMillis(), &quot;\u5185\u5bb9${UUID.randomUUID()}&quot;))\n        }\n        list.add(MockData(&quot;\u5934\u90e8$i&quot;, contents))\n    }\n    return list\n}<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"%E5%88%97%E8%A1%A8%E9%A1%B9%E5%AF%86%E5%B0%81%E7%B1%BB\"><\/span>\u5217\u8868\u9879\u5bc6\u5c01\u7c7b<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre><code class=\"\" data-line=\"\">package cn.wthee.recyclerviewheader.data\n\nsealed class ListItem {\n\n    abstract val id: Long\n\n    data class Content(val content: MockContent) : ListItem() {\n        override val id = content.id\n    }\n\n    data class Header(val header: String) : ListItem() {\n        override val id = Long.MIN_VALUE\n    }\n}\n<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"%E5%88%97%E8%A1%A8%E9%80%82%E9%85%8D%E5%99%A8\"><\/span>\u5217\u8868\u9002\u914d\u5668<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre><code class=\"\" data-line=\"\">package cn.wthee.recyclerviewheader.adapter\n\nimport android.view.LayoutInflater\nimport android.view.ViewGroup\nimport androidx.recyclerview.widget.DiffUtil\nimport androidx.recyclerview.widget.ListAdapter\nimport androidx.recyclerview.widget.RecyclerView\nimport androidx.viewbinding.ViewBinding\nimport cn.wthee.recyclerviewheader.data.ListItem\nimport cn.wthee.recyclerviewheader.data.MockContent\nimport cn.wthee.recyclerviewheader.data.MockData\nimport cn.wthee.recyclerviewheader.databinding.ItemContentBinding\nimport cn.wthee.recyclerviewheader.databinding.ItemHeaderBinding\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.launch\nimport kotlinx.coroutines.withContext\n\nclass HeaderListAdapter : ListAdapter&lt;ListItem, HeaderListAdapter.ViewHolder&gt;(DiffCallback()) {\n\n    private val ITEM_VIEW_TYPE_HEADER = 0\n    private val ITEM_VIEW_TYPE_ITEM = 1\n    private val adapterScope = CoroutineScope(Dispatchers.Default)\n\n    fun addHeaderAndSubmitList(list: List&lt;MockData&gt;?) {\n        adapterScope.launch {\n            val items = when {\n                \/\/\u65e0\u6570\u636e\u65f6\n                list == null || list.isEmpty() -&gt; listOf(ListItem.Header(&quot;\u5934\u90e8\u4e3a\u7a7a&quot;)) + listOf(\n                    ListItem.Content(\n                        MockContent(-1, &quot;\u6682\u65e0&quot;)\n                    )\n                )\n                \/\/\u5904\u7406\u6570\u636e\n                else -&gt; {\n                    val datas = arrayListOf&lt;ListItem&gt;()\n                    list.forEach {\n                        \/\/\u6dfb\u52a0\u5934\u90e8\n                        datas.add(ListItem.Header(it.type))\n                        \/\/\u904d\u5386\u5185\u5bb9\uff0c\u5e76\u6dfb\u52a0\n                        it.contents.forEach { content -&gt;\n                            datas.add(ListItem.Content(content))\n                        }\n                    }\n                    datas\n                }\n            }\n            withContext(Dispatchers.Main) {\n                submitList(items)\n            }\n        }\n    }\n\n    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {\n        return when (viewType) {\n            ITEM_VIEW_TYPE_HEADER -&gt; ViewHolder(\n                ItemHeaderBinding.inflate(\n                    LayoutInflater.from(parent.context),\n                    parent,\n                    false\n                )\n            )\n            ITEM_VIEW_TYPE_ITEM -&gt; ViewHolder(\n                ItemContentBinding.inflate(\n                    LayoutInflater.from(parent.context),\n                    parent,\n                    false\n                )\n            )\n            else -&gt; throw ClassCastException(&quot;Unknown viewType $viewType&quot;)\n        }\n\n    }\n\n    override fun onBindViewHolder(holder: ViewHolder, position: Int) {\n        holder.bind(getItem(position))\n    }\n\n    inner class ViewHolder(private val binding: ViewBinding) :\n        RecyclerView.ViewHolder(binding.root) {\n        fun bind(item: ListItem) {\n            when (item) {\n                \/\/\u5185\u5bb9\n                is ListItem.Content -&gt; {\n                    (binding as ItemContentBinding).apply {\n                        content.text = item.content.data\n                    }\n                }\n                \/\/\u5934\u90e8\n                is ListItem.Header -&gt; {\n                    (binding as ItemHeaderBinding).apply {\n                        header.text =item.header\n                    }\n                }\n            }\n        }\n\n    }\n\n    override fun getItemViewType(position: Int): Int {\n        return when (getItem(position)) {\n            is ListItem.Header -&gt; ITEM_VIEW_TYPE_HEADER\n            is ListItem.Content -&gt; ITEM_VIEW_TYPE_ITEM\n        }\n    }\n}\n\nprivate class DiffCallback : DiffUtil.ItemCallback&lt;ListItem&gt;() {\n\n    override fun areItemsTheSame(\n        oldItem: ListItem,\n        newItem: ListItem\n    ): Boolean {\n        return oldItem.id == newItem.id\n    }\n\n    override fun areContentsTheSame(\n        oldItem: ListItem,\n        newItem: ListItem\n    ): Boolean {\n        return oldItem == newItem\n    }\n}\n<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"%E5%8A%A0%E8%BD%BD%E6%95%B0%E6%8D%AE\"><\/span>\u52a0\u8f7d\u6570\u636e<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre><code class=\"\" data-line=\"\">package cn.wthee.recyclerviewheader\n\nimport androidx.appcompat.app.AppCompatActivity\nimport android.os.Bundle\nimport cn.wthee.recyclerviewheader.adapter.HeaderListAdapter\nimport cn.wthee.recyclerviewheader.data.loadData\nimport cn.wthee.recyclerviewheader.databinding.ActivityMainBinding\n\nclass MainActivity : AppCompatActivity() {\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        val binding = ActivityMainBinding.inflate(layoutInflater)\n        setContentView(binding.root)\n\n        val adapter = HeaderListAdapter()\n        binding.list.adapter = adapter\n        adapter.addHeaderAndSubmitList(loadData())\n    }\n\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>RecyclerView \u5206\u7ec4\u6548\u679c\u7684\u5b9e\u73b0\u65b9\u5f0f<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_kad_post_transparent":"default","_kad_post_title":"default","_kad_post_layout":"default","_kad_post_sidebar_id":"","_kad_post_content_style":"default","_kad_post_vertical_padding":"default","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_jetpack_newsletter_access":""},"categories":[3],"tags":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pcwHG0-1m","jetpack-related-posts":[{"id":89,"url":"https:\/\/wthee.xyz\/index.php\/2020\/12\/22\/android-navigation-%e6%b7%bb%e5%8a%a0%e8%bf%87%e6%b8%a1%e6%95%88%e6%9e%9c\/","url_meta":{"origin":84,"position":0},"title":"Android Navigation \u6dfb\u52a0\u8fc7\u6e21\u6548\u679c","author":"wthee","date":"2020\u5e7412\u670822\u65e5","format":false,"excerpt":"\u4f7f\u7528 Container transform\u4e3a\u5bfc\u822a\u7ec4\u4ef6 Navigation \u6dfb\u52a0\u8fc7\u6e21\u52a8\u753b","rel":"","context":"\u5728\u201cAndroid \u5f00\u53d1\u201d\u4e2d","block_context":{"text":"Android \u5f00\u53d1","link":"https:\/\/wthee.xyz\/index.php\/category\/android\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":67,"url":"https:\/\/wthee.xyz\/index.php\/2020\/11\/27\/android-bottomsheetdialogfragment-%e5%9c%86%e8%a7%92%e5%92%8c%e8%87%aa%e5%ae%9a%e4%b9%89%e5%8a%a8%e7%94%bb\/","url_meta":{"origin":84,"position":1},"title":"Android BottomSheetDialogFragment \u2014 \u5706\u89d2\u548c\u81ea\u5b9a\u4e49\u52a8\u753b","author":"wthee","date":"2020\u5e7411\u670827\u65e5","format":false,"excerpt":"\u4e3a BottomSheetDialogFragment \u6dfb\u52a0\u5706\u89d2\u3001\u81ea\u5b9a\u4e49\u52a8\u753b","rel":"","context":"\u5728\u201cAndroid \u5f00\u53d1\u201d\u4e2d","block_context":{"text":"Android \u5f00\u53d1","link":"https:\/\/wthee.xyz\/index.php\/category\/android\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1573,"url":"https:\/\/wthee.xyz\/index.php\/2021\/06\/08\/jetpack-compose-%e5%ae%9e%e7%8e%b0%e6%bb%91%e5%8a%a8%e6%8a%98%e5%8f%a0%e6%95%88%e6%9e%9c\/","url_meta":{"origin":84,"position":2},"title":"Jetpack Compose \u5b9e\u73b0\u6ed1\u52a8\u6298\u53e0\u6548\u679c","author":"wthee","date":"2021\u5e746\u67088\u65e5","format":false,"excerpt":"\u5229\u7528 rememberScrollState() \uff0c\u5b9e\u73b0\u6ed1\u52a8\u6298\u53e0\u7684\u6548\u679c","rel":"","context":"\u5728\u201cAndroid \u5f00\u53d1\u201d\u4e2d","block_context":{"text":"Android \u5f00\u53d1","link":"https:\/\/wthee.xyz\/index.php\/category\/android\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1406,"url":"https:\/\/wthee.xyz\/index.php\/2021\/02\/19\/android-retrofit-%e8%bf%9b%e8%a1%8c-https-%e8%af%b7%e6%b1%82\/","url_meta":{"origin":84,"position":3},"title":"Android Retrofit \u8fdb\u884c https \u8bf7\u6c42","author":"wthee","date":"2021\u5e742\u670819\u65e5","format":false,"excerpt":"Retrofit 2 \u4f7f\u7528\u8bc1\u4e66\u8fdb\u884c https \u8bf7\u6c42\u7684\u4ee3\u7801\u5b9e\u73b0","rel":"","context":"\u5728\u201cAndroid \u5f00\u53d1\u201d\u4e2d","block_context":{"text":"Android \u5f00\u53d1","link":"https:\/\/wthee.xyz\/index.php\/category\/android\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1563,"url":"https:\/\/wthee.xyz\/index.php\/2021\/06\/08\/jetpack-compose-chipgroup\/","url_meta":{"origin":84,"position":4},"title":"Jetpack Compose ChipGroup","author":"wthee","date":"2021\u5e746\u67088\u65e5","format":false,"excerpt":"\u5b9e\u73b0 ChipGroup \u7ec4\u4ef6","rel":"","context":"\u5728\u201cAndroid \u5f00\u53d1\u201d\u4e2d","block_context":{"text":"Android \u5f00\u53d1","link":"https:\/\/wthee.xyz\/index.php\/category\/android\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1576,"url":"https:\/\/wthee.xyz\/index.php\/2021\/06\/09\/jetpack-compose-%e6%8b%96%e5%8a%a8%e6%95%88%e6%9e%9c\/","url_meta":{"origin":84,"position":5},"title":"Jetpack Compose \u62d6\u52a8\u6548\u679c","author":"wthee","date":"2021\u5e746\u67089\u65e5","format":false,"excerpt":"\u5229\u7528 Modifier.draggable \u76d1\u542c\u62d6\u52a8\u8ddd\u79bb\uff0c\u5b9e\u73b0\u62d6\u52a8\u6548\u679c","rel":"","context":"\u5728\u201cAndroid \u5f00\u53d1\u201d\u4e2d","block_context":{"text":"Android \u5f00\u53d1","link":"https:\/\/wthee.xyz\/index.php\/category\/android\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/wthee.xyz\/index.php\/wp-json\/wp\/v2\/posts\/84"}],"collection":[{"href":"https:\/\/wthee.xyz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wthee.xyz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wthee.xyz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wthee.xyz\/index.php\/wp-json\/wp\/v2\/comments?post=84"}],"version-history":[{"count":2,"href":"https:\/\/wthee.xyz\/index.php\/wp-json\/wp\/v2\/posts\/84\/revisions"}],"predecessor-version":[{"id":1591,"href":"https:\/\/wthee.xyz\/index.php\/wp-json\/wp\/v2\/posts\/84\/revisions\/1591"}],"wp:attachment":[{"href":"https:\/\/wthee.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=84"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wthee.xyz\/index.php\/wp-json\/wp\/v2\/categories?post=84"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wthee.xyz\/index.php\/wp-json\/wp\/v2\/tags?post=84"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}