syedowaisali / crystal-range-seekbar

538 stars 166 forks source link

How to set default value or set thumb to the specific value #7

Closed aashirjaved-zz closed 7 years ago

aashirjaved-zz commented 8 years ago

I want to set the thumb to the last saved value is that possible?

syedowaisali commented 8 years ago
final CrystalRangeSeekbar rangeSeekbar = (CrystalRangeSeekbar) findViewById(R.id.seekbar);
rangeSeekbar.setMinStartValue(20).setMaxStartValue(80).apply();
abhishek158 commented 7 years ago

I also have same issue & I applied below code

ageRange =(CrystalRangeSeekbar)rootView.findViewById(R.id.rangeSeekbarAge);
        ageRange.setMinValue(1);//this work
        ageRange.setMaxValue(100);//this work 

        ageRange.setMinStartValue(20).setMaxStartValue(80).apply();//this not work 
        ageRange.apply();
    setMinStartValue() & setMaxStartValue() does not show any effect nor error. Please tell how i setMinStart value of thumb.
sousav commented 7 years ago

Still not working, Will you update it?

TaraAndroid commented 7 years ago

not working @syedowaisali will you update it.

aniltiwari1402 commented 7 years ago

Hey, I've configured range seek bar in my app, It is working fine, I am able to set default minimum and maximum values to the seek bar as well. Also it is taking the new minimum and max values (i.e. range, dynamically) But I want to set this value (new min/max value) to the activity so that it should indicate the last value that I've selected.

ghost commented 7 years ago

Hi @abhishek158,

If you want to set initial value to seek bar. You should write this code: seekbar.setMinStartValue(50); seekbar.apply();

bhavikmehta5491 commented 6 years ago

The logic is save minUserSelected value somewhere and do seekbar.setMinStartValue(minUserSelected).apply();

seekbar.apply();

Dilip-lohar commented 3 years ago
    rangeSeekbar.setMinStartValue(min) ;
    rangeSeekbar.setMaxStartValue(max);
    rangeSeekbar.apply();