BelooS / ChipsLayoutManager

ANDROID. ChipsLayoutManager (SpanLayoutManager, FlowLayoutManager). A custom layout manager for RecyclerView which mimicric TextView span behaviour, flow layouts behaviour with support of amazing recyclerView features
Apache License 2.0
3.26k stars 362 forks source link

IllegalArgumentException: top point of input rect can't be lower than minTop #48

Open Wavesonics opened 7 years ago

Wavesonics commented 7 years ago

I don't know what causes this, it's possibly when populating, but I don't have a solid repro.

java.lang.IllegalArgumentException: top point of input rect can't be lower than minTop
   at com.beloo.widget.chipslayoutmanager.gravity.BottomGravityModifier.modifyChildRect(BottomGravityModifier.java:9)
   at com.beloo.widget.chipslayoutmanager.layouter.AbstractLayouter.applyChildGravity(AbstractLayouter.java:277)
   at com.beloo.widget.chipslayoutmanager.layouter.AbstractLayouter.layoutRow(AbstractLayouter.java:250)
   at com.beloo.widget.chipslayoutmanager.ChipsLayoutManager.fillWithLayouter(ChipsLayoutManager.java:893)
   at com.beloo.widget.chipslayoutmanager.ChipsLayoutManager.fill(ChipsLayoutManager.java:821)
   at com.beloo.widget.chipslayoutmanager.ChipsLayoutManager.onScrolled(ChipsLayoutManager.java:1165)
   at com.beloo.widget.chipslayoutmanager.ScrollingController.scrollBy(ScrollingController.java:159)
   at com.beloo.widget.chipslayoutmanager.ScrollingController.scrollVerticallyBy(ScrollingController.java:152)
   at com.beloo.widget.chipslayoutmanager.ChipsLayoutManager.scrollVerticallyBy(ChipsLayoutManager.java:1138)
   at android.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:4838)
   at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
   at android.view.Choreographer.doCallbacks(Choreographer.java:723)
   at android.view.Choreographer.doFrame(Choreographer.java:655)
   at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
   at android.os.Handler.handleCallback(Handler.java:789)
   at android.os.Handler.dispatchMessage(Handler.java:98)
   at android.os.Looper.loop(Looper.java:164)
   at android.app.ActivityThread.main(ActivityThread.java:6541)
   at java.lang.reflect.Method.invoke(Native Method)
   at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
matecode commented 7 years ago

For me the same

java.lang.IllegalArgumentException: top point of input rect can't be lower than minTop
at com.beloo.widget.chipslayoutmanager.gravity.CenterInRowGravityModifier.modifyChildRect(CenterInRowGravityModifier.java:9)
at com.beloo.widget.chipslayoutmanager.layouter.AbstractLayouter.applyChildGravity(AbstractLayouter.java:277)
at com.beloo.widget.chipslayoutmanager.layouter.AbstractLayouter.layoutRow(AbstractLayouter.java:250)
at com.beloo.widget.chipslayoutmanager.ChipsLayoutManager.fillWithLayouter(ChipsLayoutManager.java:893)
at com.beloo.widget.chipslayoutmanager.ChipsLayoutManager.fill(ChipsLayoutManager.java:821)
at com.beloo.widget.chipslayoutmanager.ChipsLayoutManager.onScrolled(ChipsLayoutManager.java:1165)
at com.beloo.widget.chipslayoutmanager.ScrollingController.scrollBy(ScrollingController.java:159)
at com.beloo.widget.chipslayoutmanager.ScrollingController.scrollVerticallyBy(ScrollingController.java:152)
at com.beloo.widget.chipslayoutmanager.ChipsLayoutManager.scrollVerticallyBy(ChipsLayoutManager.java:1138)
at android.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:4838)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874)
at android.view.Choreographer.doCallbacks(Choreographer.java:686)
at android.view.Choreographer.doFrame(Choreographer.java:618)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6236)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:891)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:781)

Any further information needed to fix that ?

nicolepaprocki commented 7 years ago

I got the same crash, it was working fine until I added .setRowStrategy(ChipsLayoutManager.STRATEGY_CENTER_DENSE), it didn't crash for other strategies

yazansayed commented 5 years ago

for me, this message always shows when fast scrolling to top of the recyclerView , it's reproducible

DuShuYuan commented 4 years ago

same crash

ChipsLayoutManager chipsLayoutManager = ChipsLayoutManager.newBuilder(this) .build(); rec.setLayoutManager(chipsLayoutManager);

Bavneet6 commented 3 years ago

any update on this ?

mukkumukesh commented 3 years ago

I got the same crash. Any update??

Fatal Exception: java.lang.IllegalArgumentException: top point of input rect can't be lower than minTop at com.beloo.widget.chipslayoutmanager.gravity.CenterInRowGravityModifier.modifyChildRect(CenterInRowGravityModifier.java:9) at com.beloo.widget.chipslayoutmanager.layouter.AbstractLayouter.applyChildGravity(AbstractLayouter.java:277) at com.beloo.widget.chipslayoutmanager.layouter.AbstractLayouter.layoutRow(AbstractLayouter.java:250) at com.beloo.widget.chipslayoutmanager.ChipsLayoutManager.fillWithLayouter(ChipsLayoutManager.java:893) at com.beloo.widget.chipslayoutmanager.ChipsLayoutManager.fill(ChipsLayoutManager.java:821) at com.beloo.widget.chipslayoutmanager.ChipsLayoutManager.onScrolled(ChipsLayoutManager.java:1165) at com.beloo.widget.chipslayoutmanager.ScrollingController.scrollBy(ScrollingController.java:159) at com.beloo.widget.chipslayoutmanager.ScrollingController.scrollVerticallyBy(ScrollingController.java:152) at com.beloo.widget.chipslayoutmanager.ChipsLayoutManager.scrollVerticallyBy(ChipsLayoutManager.java:1138) at androidx.recyclerview.widget.RecyclerView.scrollStep(RecyclerView.java:1841) at androidx.recyclerview.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:5302) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:999) at android.view.Choreographer.doCallbacks(Choreographer.java:797) at android.view.Choreographer.doFrame(Choreographer.java:728) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:984) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:237) at android.app.ActivityThread.main(ActivityThread.java:8167) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)