I have a seekbar and trying to set the value from 60 to 180 for one and 40 to 190 for the second one in step of 1.
sb1 = (SeekBar) findViewById(R.id.progress
Set seekbar max and min value
seekbar have method that setmax(int position) and setProgress(int position)
thanks
paySeekRange.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
Debug.i(TAG, "onProgressChanged 1: " + progress);
int progressMin = (progress * (maxPayRange - minPayRange) / 100) + minPayRange;
Debug.i(TAG, "onProgressChanged 2: " + progress);
int progressMax = (progress * (maxPayRange) / 100);
progress = (progress * (progressMax - progressMin) / 100) + progressMin;
Debug.i(TAG, "onProgressChanged 3: " + progress);
txtWeeklyPay.setText("$".concat(String.valueOf(progress)));
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
}
});