{"id":353,"date":"2023-02-25T07:08:55","date_gmt":"2023-02-24T23:08:55","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=353"},"modified":"2023-04-30T14:45:38","modified_gmt":"2023-04-30T06:45:38","slug":"recyclerview-basic-summary","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/02\/25\/recyclerview-basic-summary\/","title":{"rendered":"RecyclerView\u57fa\u7840\u603b\u7ed3"},"content":{"rendered":"<h2>\u5173\u8054\u7c7b<\/h2>\n<ul>\n<li>1\u3001<code>RecyclerView.Adapter<\/code>: \u62bd\u8c61\u7c7b\uff0c\u4e3aRecyclerView\u63d0\u4f9b\u6570\u636e\uff0c\u4e00\u822c\u6839\u636e\u4e0d\u540c\u7684\u4e1a\u52a1\u9700\u6c42\u6765\u7f16\u5199\u5177\u4f53\u7684\u5b9e\u73b0\u7c7b\u3002<\/li>\n<li>2\u3001<code>RecyclerView.LayoutManager<\/code>: \u62bd\u8c61\u7c7b\uff0c\u4e3b\u8981\u7528\u4e8e\u6d4b\u91cfRecyclerView\u7684\u5b50Item\uff0c\u4ee5\u53ca\u6839\u636e\u4e0d\u540c\u7684\u5e03\u5c40\u65b9\u5f0f\u6765\u5b9e\u73b0Item\u7684\u5e03\u5c40\u6548\u679c\uff0cv7\u5305\u81ea\u5e26\u7684\u5b9e\u73b0\u7c7b\u6709\uff1aLinearLayoutManager\u3001StaggeredGridLayoutManager\u3001GridLayoutManager\u3002<\/li>\n<li>3\u3001<code>RecyclerView.ItemDecoration<\/code>: \u62bd\u8c61\u7c7b\uff0c\u4e3b\u8981\u7528\u4e8e\u4e0d\u540c\u7684Item\u4e4b\u95f4\u6dfb\u52a0\u5206\u5272\u7ebf\uff08\u53ef\u9009\uff09\u3002\u5b98\u65b9\u6ca1\u6709\u5b9e\u73b0\u7c7b\uff0c\u6240\u4ee5\u5982\u679c\u8981\u6dfb\u52a0\u5206\u5272\u7ebf\uff0c\u9700\u8981\u624b\u52a8\u5b9e\u73b0\u8fd9\u4e2a\u62bd\u8c61\u7c7b\u3002<\/li>\n<li>4\u3001<code>RecyclerView.ItemAnimator<\/code>: \u62bd\u8c61\u7c7b\uff0c\u4e3b\u8981\u7528\u4e8e\u5f53\u4e00\u4e2aitem\u6dfb\u52a0\u6216\u8005\u5220\u9664\u7684\u65f6\u5019\u51fa\u73b0\u7684\u52a8\u753b\u6548\u679c\uff0c\u5b98\u65b9\u63d0\u4f9b\u4e00\u4e2a\u9ed8\u8ba4\u7684\u5b9e\u73b0\u7c7b\u3002\u5982\u679c\u60f3\u8981\u4f7f\u6211\u4eec\u7684RecyclerView\u5728\u6dfb\u52a0\u3001\u5220\u9664\u6570\u636e\u7684\u65f6\u5019\u6709\u70ab\u9177\u7684\u52a8\u753b\uff0c\u53ef\u4ee5\u5b9e\u73b0\u8fd9\u4e2a\u62bd\u8c61\u7c7b\u3002<\/li>\n<\/ul>\n<p><!-- more --><\/p>\n<h2>\u901a\u7528\u6846\u67b6<\/h2>\n","protected":false},"excerpt":{"rendered":"<p>\u5173\u8054\u7c7b 1\u3001RecyclerView.Adapter: \u62bd\u8c61\u7c7b\uff0c\u4e3aRecyclerView\u63d0\u4f9b\u6570\u636e\uff0c\u4e00\u822c\u6839\u636e\u4e0d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[119],"tags":[65],"class_list":["post-353","post","type-post","status-publish","format-standard","hentry","category-android-ui","tag-recyclerview"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/353","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=353"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/353\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=353"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}