AndroidImageSlider icon indicating copy to clipboard operation
AndroidImageSlider copied to clipboard

Probably a bug in SliderLayout.getCurrentSlider().

Open MouslihAbdelhakim opened this issue 9 years ago • 4 comments

Hello there, First of all i really want to thank you for this gorgeous library, and the amazing documentation that you put together.

I noticed that if you call the method SliderLayout.getCurrentSlider() without any Slider in the SliderLayout you get "a divided by zero" exception. I don't know if this is an intended behavior or not.

If it isn't an intended behavior can i suggest that the method returns null, or the method should specify that it may throw a divided by zero exception in case it got called before filling the sliderLayout.

Also an other thing, can you add a function to determine if the SliderLayout is empty?

it may look something like this:

SliderAdapter.isEmpty(){ return mImageContents.size() == 0; }

SliderLayout.isEmpty(){ return mSliderAdapter.isEmpty(); }

again Thank you so so much for this amazing library and i apologize if i'm not using github right, this is my first using github.

MouslihAbdelhakim avatar Jul 06 '15 01:07 MouslihAbdelhakim

need isEmpty() or getCount() or getAdapter() methods or getCurrentPosition() returns -1 for empty slider

p.s: tnx for this library

askarsyzdykov avatar Jul 25 '15 09:07 askarsyzdykov

+1

Meet same problem, hope to improve

jianbingfang avatar Nov 15 '15 02:11 jianbingfang

it's still open till 2022

MoustafaElsaghier avatar Oct 09 '22 09:10 MoustafaElsaghier

感谢你的来信,我会及时处理。祝工作顺利,万事如意

JackyKeke avatar Oct 09 '22 09:10 JackyKeke