Skip to content

Commit

Permalink
Disable slide (not autocycle) when theres only one image? daimajia#82
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouqiangWang committed May 6, 2015
1 parent 97e3276 commit 6bb1164
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -246,6 +246,9 @@ public void startAutoCycle(){
* @param autoRecover if recover after user touches the slider.
*/
public void startAutoCycle(long delay,long duration,boolean autoRecover){
if (mSliderAdapter.getCount() <= 1) {
return;
}
if(mCycleTimer != null) mCycleTimer.cancel();
if(mCycleTask != null) mCycleTask.cancel();
if(mResumingTask != null) mResumingTask.cancel();
Expand Down

0 comments on commit 6bb1164

Please sign in to comment.