Hi, has anyone experienced problems with `Fragment...
# android
s
Hi, has anyone experienced problems with
FragmentPagerAdapter
when overriding
setPrimaryItem()
after updating the support library to version 27.0.0. The signature changed from
setPrimaryItem(container: ViewGroup, position: Int, obj: Any?)
to
setPrimaryItem(container: ViewGroup, position: Int, obj: Any)
. It's causing an illegal argument exception because obj is null.
l
Maybe you should post an issue on b.android.com?
p
While the documentation is a bit vague the concept is that you should return non-null values from instantiateItem. If you return null isViewFromObject will also not work properly.