How to Set an Android SeekBar to be unmoveable/frozen?

后端 未结 2 1293
日久生厌
日久生厌 2020-12-16 10:06

In my XML, I\'ve set the focusable, focusableInTouchMode, clickable, and longClickable variables to false, yet I can stil

相关标签:
2条回答
  • 2020-12-16 10:40

    You need to do this from your activity or fragment by

    mySeekBar.setEnabled(false);

    0 讨论(0)
  • 2020-12-16 10:50

    You could create a subclass whose parent is a SeekBar. In your new class, override the onTouchEvent() method to always return false.

    This solution should not "grey out" the seek bar since the enabled state will not change.

    0 讨论(0)
提交回复
热议问题