Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Calls PagerAdapters destroyItem method with a null parameter. #118

Open
Fabrik19 opened this issue Dec 18, 2018 · 0 comments
Open

Calls PagerAdapters destroyItem method with a null parameter. #118

Fabrik19 opened this issue Dec 18, 2018 · 0 comments

Comments

@Fabrik19
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants