make bundle nullable at saving state

This commit is contained in:
tibbi 2018-05-13 21:17:22 +02:00
parent abaa1f2e08
commit d5c7a5a8ca

View file

@ -57,7 +57,7 @@ class MyPagerAdapter(val activity: ViewPagerActivity, fm: FragmentManager, val m
// try fixing TransactionTooLargeException crash on Android Nougat, tip from https://stackoverflow.com/a/43193425/1967672
override fun saveState(): Parcelable? {
val bundle = super.saveState() as Bundle?
bundle!!.putParcelableArray("states", null)
bundle?.putParcelableArray("states", null)
return bundle
}
}