Skip to content

Commit

Permalink
Output limitValue as current if limit is reached
Browse files Browse the repository at this point in the history
  • Loading branch information
Edgar Žigis committed Mar 31, 2021
1 parent b3ee4fd commit a100d80
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Make sure you have jitpack.io included in your gradle repositories.
maven { url "https://jitpack.io" }
```
```
implementation 'com.github.edgar-zigis:LabeledSeekSlider:1.0.5'
implementation 'com.github.edgar-zigis:LabeledSeekSlider:1.0.6'
```
### Usage
``` xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -572,12 +572,14 @@ open class LabeledSeekSlider : View {
}
}
bubbleText = "$limitValueIndicator ${getUnitValue(limitValue!!)}"
} else bubbleText = getUnitValue(displayValue)

currentValue = displayValue
currentValue = limitValue!!
} else {
bubbleText = getUnitValue(displayValue)
currentValue = displayValue
}

if (previousText != bubbleText && previousText.isNotEmpty()) {
onValueChanged?.invoke(displayValue)
onValueChanged?.invoke(currentValue)
}

bubbleTextPaint.getTextBounds(bubbleText, 0, bubbleText.length, bubbleTextRect)
Expand Down

0 comments on commit a100d80

Please sign in to comment.