Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

In my XML, I've set the focusable, focusableInTouchMode, clickable, and longClickable variables to false, yet I can still click and move the SeekBar. Do I need to actually change the listener events to do this? That seems so unnecessary.

like image 621
Rockmaninoff Avatar asked Nov 09 '10 17:11

Rockmaninoff


Video Answer


1 Answers

You need to do this from your activity or fragment by

//java mySeekBar.setEnabled(false); 
//kotlin mySeekBar.enabled = false; 

Or if you want to do it by xml

android:enabled="false" 
like image 130
james Avatar answered Oct 18 '22 09:10

james