I use seekBar as an indicator and I need to exclude the possibility that the user himself could move the thumb ...
line enabled="false" does not help ...
How to do it?
Put a listener for SeekBar
mSeekBar.setOnSeekBarChangeListener(this); In the overridden method
@Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { if (fromUser){ mSeekBar.setProgress(FRIZED_PROGRESS_VALUE); } } Where FRIZED_PROGRESS_VALUE = you change programmatically. In fact, we always set the progress we need when the user tries to drag the slider.
Source: https://ru.stackoverflow.com/questions/524042/
All Articles