Skip to content

Commit

Permalink
Merge pull request #4 from aids61517/fix_divide_by_zero_error
Browse files Browse the repository at this point in the history
fix divide by zero error
  • Loading branch information
aids61517 authored Feb 22, 2021
2 parents ed0eb2f + a9d0b12 commit 8a57d4c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,10 @@ class EasyRatingView @JvmOverloads constructor(

private var fullDrawablePaint: Paint? = null

var countOfStarsPerRow: Int = 0
private set
var countOfStarsPerRow: Int = 1
private set(value) {
field = if (value <= 0) 1 else value
}

private val boundCalculator by lazy {
StarBoundCalculator(this)
Expand Down

0 comments on commit 8a57d4c

Please sign in to comment.