how to set visiblity in android for seekbar and textview -


enter image description here

**there switch button , seek bar , text view in above image
when activity starts . want seek bar , text view invisible default , when switch on switch button , both seek bar , text view should visible please provide simple code operation .

i have tried using gone ,visible , invisible stuffs . not showing effect.

**

have tried below?

@override     protected void oncreate(bundle savedinstancestate){     setcontentview(r.layout.activity_main);      // find view id here      textview.setvisiblity(view.gone);     seekbar.setvisiblity(view.gone);      myswitch.setoncheckedchangelistener(new compoundbutton.oncheckedchangelistener() {         public void oncheckedchanged(compoundbutton buttonview, boolean ischecked) {             // something, ischecked             // true if switch in on position             if(ischecked){               textview.setvisiblity(view.visible);               seekbar.setvisiblity(view.visible);             }else{               textview.setvisiblity(view.gone);               seekbar.setvisiblity(view.gone);             }         }     });     } 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -