6

Please help me to disable the seekbar through the xml file rather than through the code

<SeekBar
    ........
    android:clickable="false"
    android:longClickable="false"
    android:focusable="false"
    android:focusableInTouchMode="false" />

Have tried with all the above attributes, but cant disable the seekbar. Thanks in advance

jithu
  • 151
  • 11

2 Answers2

3

Simple:

android:enabled="false"
dymmeh
  • 22,247
  • 5
  • 53
  • 60
0

As this answer said you can override setOnTouchListener event on SeekBar object and return true for not allowing user to change control value. I hope this helps ;)

Yashar Aliabbasi
  • 2,663
  • 1
  • 23
  • 35