Closed AndroidBread closed 9 months ago
如图,无论是header还是加载更多。都只展示了GridLayoutManager中的一个条目的宽度。想问一下有没有做对应的适配。可以让头尾布局宽度可以满屏。
看源码找到解决方案了。轮子中提供了QuickGridLayoutManager + FullSpanAdapterType的方式,可以实现网格布局下满跨度展示。需要满跨度展示的头尾布局adapter需要实现FullSpanAdapterType接口,对应的recyclerview需要使用QuickGridLayoutManager。
使用多类型item布局,RecyclerView使用QuickGridLayoutManager布局管理器,你需要横向撑满的item实现FullSpanAdapterType接口就可以了。
2024年2月2日 16:36,Flash @.***> 写道:
你这种方案只能解决header和footer的横向撑满屏幕问题吧,如果网格布局里,某个item需要横向撑满布局呢?这个框架似乎没有提供一些合适的范例?
— Reply to this email directly, view it on GitHub https://github.com/CymChad/BaseRecyclerViewAdapterHelper/issues/3839#issuecomment-1923327534, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADZUEZSXBAETT2OCVHY3T3TYRSQRPAVCNFSM6AAAAABBMI4MUWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRTGMZDONJTGQ. You are receiving this because you modified the open/close state.
代码: