You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I really like this library but it works really bad with fragments, especially with fragments inside ViewPager.
For instance, we must use handler and postDelayed to delay animation until fragment transition is completed, but it constantly fails with error java.lang.NullPointerException: Attempt to invoke virtual method 'float android.text.Layout.getLineLeft(int)' on a null object reference
java.lang.IllegalStateException: Fragment SomeFragment{xxxxx} not attached to a context.
due to fragment lifecycle and missing activity context.
I tried to use Handler as instance variable and remove handler callbacks when fragment is detached but same thing happens every time.
It looks like impossible mission to use it properly without destabilizing the whole app.
Any idea how to use it in smart way inside fragments?
Imagining that we need postDelayed to use something provided in library is really bad approach. You should handle that inside of library and not force users to handle manually.
It works good in activities.
The text was updated successfully, but these errors were encountered:
I really like this library but it works really bad with fragments, especially with fragments inside ViewPager.
For instance, we must use handler and postDelayed to delay animation until fragment transition is completed, but it constantly fails with error
java.lang.NullPointerException: Attempt to invoke virtual method 'float android.text.Layout.getLineLeft(int)' on a null object reference
java.lang.IllegalStateException: Fragment SomeFragment{xxxxx} not attached to a context.
due to fragment lifecycle and missing activity context.
I tried to use Handler as instance variable and remove handler callbacks when fragment is detached but same thing happens every time.
It looks like impossible mission to use it properly without destabilizing the whole app.
Any idea how to use it in smart way inside fragments?
Imagining that we need postDelayed to use something provided in library is really bad approach. You should handle that inside of library and not force users to handle manually.
It works good in activities.
The text was updated successfully, but these errors were encountered: