Open W2L opened 6 years ago
Do you have any more information on how to reproduce this issue? Are you using the same version of our library and the Android Support Library, and have you set up your layout similarly to the example here?
@johan12345 ,i called collapsedlayout.setText method twice , to avoid this problem , i just try to called setText method only once , and the crash never appear.
my english is poor , ^ v ^.
Fatal Exception: java.lang.IllegalArgumentException: Layout: -9 < 0 at android.text.Layout.(Layout.java:182) at android.text.StaticLayout.(StaticLayout.java:478) at android.text.StaticLayout.(StaticLayout.java:464) at android.text.StaticLayout.(StaticLayout.java:442) at android.text.StaticLayout.(StaticLayout.java:422) at net.opacapp.multilinecollapsingtoolbar.CollapsingTextHelper.calculateUsingTextSize(TbsSdkJava:742) at net.opacapp.multilinecollapsingtoolbar.CollapsingTextHelper.calculateBaseOffsets(TbsSdkJava:462) at net.opacapp.multilinecollapsingtoolbar.CollapsingTextHelper.recalculate(TbsSdkJava:877) at net.opacapp.multilinecollapsingtoolbar.CollapsingToolbarLayout.onLayout(TbsSdkJava:537) at android.view.View.layout(View.java:17829) at android.view.ViewGroup.layout(ViewGroup.java:5851) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1757) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585) at android.widget.LinearLayout.onLayout(LinearLayout.java:1494) at android.support.design.widget.AppBarLayout.onLayout(TbsSdkJava:240) at android.view.View.layout(View.java:17829) at android.view.ViewGroup.layout(ViewGroup.java:5851) at android.support.design.widget.CoordinatorLayout.layoutChild(TbsSdkJava:1191) at android.support.design.widget.CoordinatorLayout.onLayoutChild(TbsSdkJava:876) at android.support.design.widget.ViewOffsetBehavior.layoutChild(TbsSdkJava:63) at android.support.design.widget.ViewOffsetBehavior.onLayoutChild(TbsSdkJava:42) at android.support.design.widget.AppBarLayout$Behavior.onLayoutChild(TbsSdkJava:1021) at android.support.design.widget.AppBarLayout$Behavior.onLayoutChild(TbsSdkJava:787) at android.support.design.widget.CoordinatorLayout.onLayout(TbsSdkJava:894) at android.view.View.layout(View.java:17829) at android.view.ViewGroup.layout(ViewGroup.java:5851) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:17829) at android.view.ViewGroup.layout(ViewGroup.java:5851) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1757) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585) at android.widget.LinearLayout.onLayout(LinearLayout.java:1494) at android.view.View.layout(View.java:17829) at android.view.ViewGroup.layout(ViewGroup.java:5851) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:17829) at android.view.ViewGroup.layout(ViewGroup.java:5851) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1757) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585) at android.widget.LinearLayout.onLayout(LinearLayout.java:1494) at android.view.View.layout(View.java:17829) at android.view.ViewGroup.layout(ViewGroup.java:5851) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:17829) at android.view.ViewGroup.layout(ViewGroup.java:5851) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1757) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585) at android.widget.LinearLayout.onLayout(LinearLayout.java:1494) at android.view.View.layout(View.java:17829) at android.view.ViewGroup.layout(ViewGroup.java:5851) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at com.android.internal.policy.DecorView.onLayout(DecorView.java:766) at android.view.View.layout(View.java:17829) at android.view.ViewGroup.layout(ViewGroup.java:5851) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2675) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2345) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1490) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7036) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:878) at android.view.Choreographer.doCallbacks(Choreographer.java:690) at android.view.Choreographer.doFrame(Choreographer.java:625) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:864) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:185) at android.app.ActivityThread.main(ActivityThread.java:6615) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:916) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:806)