daimajia / daimajia/AndroidImageSlider

Probably a bug in SliderLayout.getCurrentSlider().

Open
#127 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
5.6k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.