Open gaminn opened 4 years ago
The text that appears in the example are TextViews that are added manually, then you can override the setOnRangeSeekbarChangeListener and change the values of the textviews . This is from the examples provided in the readme
rangeSeekbar.setOnRangeSeekbarChangeListener(new OnRangeSeekbarChangeListener() {
@Override
public void valueChanged(Number minValue, Number maxValue) {
tvMin.setText(String.valueOf(minValue));
tvMax.setText(String.valueOf(maxValue));
}
});
I tried this sample code:
As shown on the initial page of this repo this should display blue range seekbar with current values displayed on the sides. However, in my app, it doesn't display current values.
How to show current values near the seekbar? Or preferably moving labels under the thumb (I know I can implement moving text myself using onRangeSeekbarChangeListener but imagine a situation where the seekbar min and max are 0 - 10 with granularity of 1 and the seekbar is 500 px wide - the moving labels would jump, they won't move smoothly)?
How to show min and max values of the seekbar near the seekbar?