discreteSeekBar icon indicating copy to clipboard operation
discreteSeekBar copied to clipboard

Show decimal values in the indicator bubble?

Open RickBoyerDev opened this issue 9 years ago • 3 comments

Is there a way to show decimal values? It looks like the NumericTransformer only allows int?

RickBoyerDev avatar May 30 '16 19:05 RickBoyerDev

You can try this, i use this for number range from 0.00 - 1.00

histScoreSeekbar.setProgress((int) (MatcherService.histogramStandardScore * 100));

histScoreSeekbar.setOnProgressChangeListener(new DiscreteSeekBar.OnProgressChangeListener() {

@Override public void onProgressChanged(DiscreteSeekBar seekBar, int value, boolean fromUser) { String format = String.valueOf((double) seekBar.getProgress()/100); seekBar.setIndicatorFormatter(format); }

@Override public void onStartTrackingTouch(DiscreteSeekBar seekBar) { String format = String.valueOf((double) seekBar.getProgress()/100); seekBar.setIndicatorFormatter(format); }

@Override public void onStopTrackingTouch(DiscreteSeekBar seekBar) { MatcherService.histogramStandardScore = (double) seekBar.getProgress()/100; } });

khiem2794 avatar Dec 05 '16 15:12 khiem2794

Thanks @ngockhiem27

RickBoyerDev avatar Dec 06 '16 06:12 RickBoyerDev

thank you @ngockhiem27

hamdache202 avatar Dec 11 '16 01:12 hamdache202