Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Delegate 高度解耦与灵活性的 插拔式(组合模式) RecyclerView

NotificationsYou must be signed in to change notification settings

JavenLu/FlexibleRecyclerView

Repository files navigation

Delegate 高度解耦与灵活性的 插拔式(组合模式) RecyclerView    

此项目中的Adapter实现是根据HANNES DORFMANN 的一篇文章《JOE'S GREAT ADAPTER HELL ESCAPE》构建完成的。文章是根据一个开发者的小故事对Delegate 模式进行逐步的揭秘,这种设计思路可以拓宽你的视野,对构建高质量项目有所助益!

功能:

 1.帮助创建LayoutManager,省去了new 对象的烦恼 2.提供MarginDecoration 对item margin 进行设置 3.提供DividerDecoration 对item 分隔线进行配置 4.灵活添加、显示 header and footer

优化:Grid、StaggeredGrid 添加header、footer时没有占满一行的问题

特点:用一句话来概括就是 “Favor composition over inheritance” 组合优于继承。插件式设计,高解耦,高维护性,能够对应多变的需求,节约你宝贵的时间。

此项目目的:

 1.是本人对Delegate学习并掌握的练习项目。 2.为大家分享一种程序设计思路。

如有问题欢迎交流:

email:lujundevil@sina.com

qq:270849735

About

Delegate 高度解耦与灵活性的 插拔式(组合模式) RecyclerView

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp