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
1 - Description:
I'm using GlideSlider in HomeFragment, HomeFragment is one of four bottom tabs (using library https://github.com/ncapdevi/FragNav).
When the app run about 15-30 minutes, GlideSlider auto cycled on that time.
After that, I move from HomeFragment (detach) -> to ChildFragment (attach) -> and back to HomeFragment (HomeFragment attach again) -> app got Application Not Responding (ANR) with log:
at com.glide.slider.library.tricks.ViewPagerEx.populate(ViewPagerEx.java:1046)
at com.glide.slider.library.tricks.ViewPagerEx.populate(ViewPagerEx.java:931)
at com.glide.slider.library.tricks.ViewPagerEx.onMeasure(ViewPagerEx.java:1454)
at android.view.View.measure(View.java:23398)
at android.widget.RelativeLayout.measureChild(RelativeLayout.java:676)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:479)
2 - Find out the reason
I tried to find ViewPagerEx.java line 1046 and found this:
for (int pos = mCurItem + 1; pos < N; pos++) {} where N = Integer.MAX_VALUE
I think that is the problem. Do we really need to loop from currentItemPos to Integer.MAX_VALUE (~ 2,147,483,647)? If we need, do we have another way to do loop slider without this way: InfinitePagerAdapter.getCount() = Integer.MAX_VALUE??
1 - Description:
I'm using GlideSlider in HomeFragment, HomeFragment is one of four bottom tabs (using library https://github.com/ncapdevi/FragNav).
When the app run about 15-30 minutes, GlideSlider auto cycled on that time.
After that, I move from HomeFragment (detach) -> to ChildFragment (attach) -> and back to HomeFragment (HomeFragment attach again) -> app got Application Not Responding (ANR) with log:
2 - Find out the reason
I tried to find ViewPagerEx.java line 1046 and found this:
for (int pos = mCurItem + 1; pos < N; pos++) {} where N = Integer.MAX_VALUE
I think that is the problem. Do we really need to loop from currentItemPos to Integer.MAX_VALUE (~ 2,147,483,647)? If we need, do we have another way to do loop slider without this way: InfinitePagerAdapter.getCount() = Integer.MAX_VALUE??
Please help me with this case @firdausmaulan
The text was updated successfully, but these errors were encountered: