Allow to use custom LayoutManagers on the RecyclerView
See original GitHub issueHi,
I’d like to report a crash that happens while the library tries to bind a view if we use a LayoutManager different than a LinearLayoutManager or StaggeredGridLayoutManager. This is happening on the version 5.0.0-rc1 and 5.0.0-SNAPSHOT built on 2017.02.15.
Here’s the StackTrace I’m getting :
java.lang.ClassCastException: com.beloo.widget.chipslayoutmanager.ChipsLayoutManager cannot be cast to android.support.v7.widget.LinearLayoutManager
at eu.davidea.flexibleadapter.utils.Utils.findLastVisibleItemPosition(Utils.java:347)
at eu.davidea.flexibleadapter.AnimatorAdapter.animateView(AnimatorAdapter.java:369)
at eu.davidea.flexibleadapter.FlexibleAdapter.onBindViewHolder(FlexibleAdapter.java:1880)
at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:6312)
at android.support.v7.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5258)
at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5521)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5363)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5359)
at com.beloo.widget.chipslayoutmanager.ChipsLayoutManager.fillWithLayouter(ChipsLayoutManager.java:858)
at com.beloo.widget.chipslayoutmanager.ChipsLayoutManager.fill(ChipsLayoutManager.java:821)
at com.beloo.widget.chipslayoutmanager.ChipsLayoutManager.onLayoutChildren(ChipsLayoutManager.java:719)
at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3506)
at android.support.v7.widget.RecyclerView.onMeasure(RecyclerView.java:2969)
Thank you !
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Building a RecyclerView LayoutManager – Part 1
The LayoutManager API allows powerful and complex layout recycling because it ... @Override public void onLayoutChildren(RecyclerView.
Read more >Customize your RecyclerView - Android Developers
The RecyclerView uses a layout manager to position the individual items on the screen and determine when to reuse item views that are...
Read more >A custom LayoutManager case: Bumble Beeline - Medium
A custom LayoutManager extends RecyclerView.LayoutManager. This abstract class requires only one method to be implemented: generateDefaultLayoutParams() . This ...
Read more >Using the RecyclerView | CodePath Android Cliffnotes
LayoutManager that allows any item layouts including horizontal lists or ... You will have to override two main methods: one to inflate the...
Read more >android - RecyclerView with custom LayoutManager not show ...
Looking at the source of RecyclerView and LinearLayoutManager it seems that a custom LayoutManager has to implement these methods to show ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Custom layout manager are now supported, it will be available from next Snapshot. You’ll need to implement the
IFlexibleLayoutManager
. See the newFlexibleLayoutManager
as working example.@Christophe668, i will think about it.