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
When forcing an auto-scroll to (setCurrentItem) the mIndex of the item being destroyed is -1 and thus causing an IllegalStateException
E/AndroidRuntime( 3076): FATAL EXCEPTION: main
E/AndroidRuntime( 3076): java.lang.IllegalStateException: Fragment BalloonFragment{4070b790} is not currently in the FragmentManager
E/AndroidRuntime( 3076): at android.support.v4.app.FragmentManagerImpl.saveFragmentInstanceState(FragmentManager.java:595)
E/AndroidRuntime( 3076): at android.support.v4.app.FragmentStatePagerAdapter.destroyItem(FragmentStatePagerAdapter.java:136)
E/AndroidRuntime( 3076): at com.antonyt.InfiniteViewPagerAdapter.destroyItem()
E/AndroidRuntime( 3076): at android.support.v4.view.ViewPager.populate(ViewPager.java:1022)
E/AndroidRuntime( 3076): at android.support.v4.view.ViewPager.populate(ViewPager.java:934)
E/AndroidRuntime( 3076): at android.support.v4.view.ViewPager$3.run(ViewPager.java:247)
E/AndroidRuntime( 3076): at android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime( 3076): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 3076): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 3076): at android.app.ActivityThread.main(ActivityThread.java:3683)
E/AndroidRuntime( 3076): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 3076): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 3076): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime( 3076): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime( 3076): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 1186): Force finishing activity com.showtime.player/.HomeActivity
The text was updated successfully, but these errors were encountered:
The best remedy I've found, in the meantime is to modify FragmentManager.java (in the support v4 package) and re-build that jar.
Here is that patch:
592 @OverRide
593 public Fragment.SavedState saveFragmentInstanceState(Fragment fragment) {
594 if (fragment.mIndex < 0) {
595 //KEVIN FIELDING
596 return null;
597 //throwException( new IllegalStateException("Fragment " + fragment + " is not currently in the FragmentManager"));
598 }
599
however this results in pages coming up as null (meaning they are blank because when there state was thought to be getting saved it was actually saving null and thus getting null when grabbing state).
When forcing an auto-scroll to (setCurrentItem) the mIndex of the item being destroyed is -1 and thus causing an IllegalStateException
E/AndroidRuntime( 3076): FATAL EXCEPTION: main
E/AndroidRuntime( 3076): java.lang.IllegalStateException: Fragment BalloonFragment{4070b790} is not currently in the FragmentManager
E/AndroidRuntime( 3076): at android.support.v4.app.FragmentManagerImpl.saveFragmentInstanceState(FragmentManager.java:595)
E/AndroidRuntime( 3076): at android.support.v4.app.FragmentStatePagerAdapter.destroyItem(FragmentStatePagerAdapter.java:136)
E/AndroidRuntime( 3076): at com.antonyt.InfiniteViewPagerAdapter.destroyItem()
E/AndroidRuntime( 3076): at android.support.v4.view.ViewPager.populate(ViewPager.java:1022)
E/AndroidRuntime( 3076): at android.support.v4.view.ViewPager.populate(ViewPager.java:934)
E/AndroidRuntime( 3076): at android.support.v4.view.ViewPager$3.run(ViewPager.java:247)
E/AndroidRuntime( 3076): at android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime( 3076): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 3076): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 3076): at android.app.ActivityThread.main(ActivityThread.java:3683)
E/AndroidRuntime( 3076): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 3076): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 3076): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime( 3076): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime( 3076): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 1186): Force finishing activity com.showtime.player/.HomeActivity
The text was updated successfully, but these errors were encountered: