Android Seekbar - only allow change with thumb? -


i have seekbar want allow changing thumb/handle portion. if user taps anywhere else, i'd tap ignored.

is there inherant property this? if not, know can set ontouch listener , return true "disable" it, there way detect when thumb tapped can tell ontouch return false in case?

i assume want change thumb position via code, user restricted.so try this.may you.

            myseekbar.setonseekbarchangelistener( new onseekbarchangelistener() {              int originalprogress;              @override             public void onstoptrackingtouch(seekbar seekbar) {             }              @override             public void onstarttrackingtouch(seekbar seekbar) {                 originalprogress = seekbar.getprogress();             }              @override             public void onprogresschanged(seekbar seekbar, int arg1, boolean fromuser) {                 if( fromuser == true){                     seekbar.setprogress(originalprogress);                 }                            }         }); 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -