UltraViewPager
UltraViewPager copied to clipboard
Calls PagerAdapters destroyItem method with a null parameter.
This view pager is very hard to use while writing the PagerAdapter in Kotlin.
The third parameter of the destroyItem method has a @NonNull annotation. As Kotlin translates this to a non nullable parameter and checks this non nullability at runtime the app crashes when null is provided to this method.
Sadly the UltraViewPager uses this part of code:
View child = ((RelativeLayout) object).getChildAt(0);
((RelativeLayout) object).removeAllViews();
adapter.destroyItem(container, realPosition, child);
If the RelativeLayout has no children null is provided to the destroyItem method.