Skip to content Skip to sidebar Skip to footer

How Can I Make Seekbar Non Touchable?

I have scenario where I have to show some level using a progress bar, but according to the design this progress bar has a thumb like circle on it too. Now the user is not supposed

Solution 1:

Another option is to call setOnTouchListener and use a listener that always returns false. Note that this UI is confusing to users as you want the seekbar to look like an active one, but not behave like an active seekbar. For UI consistency, using setEnabled(false) is more consistent, and the colors are different for a good reason.

Solution 2:

what you can do is, create custom seekbarwith following two property, and call enable(false)

android:progressDrawable="@drawable/progress_bar"

android:thumb="@android:color/transparent" // to make thumb invisible

and then call for runtime

SeekBar.setEnabled(false)

and from xml

android:enabled="false"

Post a Comment for "How Can I Make Seekbar Non Touchable?"