android - How to make a webview content invisible? -


i video in application vimeo.com , play in webview. problem when want make webview invisible, doesn't work. container disappears content still there, inactive(i mean cannot control it) there. works fine common website, in case doesn't. have tried of webview properties no result.

i'm not looking stop,pause or resume video in way, want make of invisible.

   @override    public void oncreate(bundle savedinstancestate) {      super.oncreate(savedinstancestate);     setcontentview(r.layout.main);      mwebview = (webview)findviewbyid(r.id.wv);     mwebview.getsettings().setjavascriptenabled(true);     mwebview.getsettings().setpluginsenabled(true);      //mwebview.loaddatawithbaseurl(null,"<html><body> <iframe id='video' src='http://player.vimeo.com/video/37817858?autoplay=1&api=1'" +             //" width='300px' height='200px' frameborder='0'></iframe></html><body> ", "text/html", "utf-8",null);      mwebview.loadurl("http://player.vimeo.com/video/37817858");     button mbtn = (button)findviewbyid(r.id.btn);     mbtn.setonclicklistener(new onclicklistener() {          @override         public void onclick(view v) {             // todo auto-generated method stub             if(mwebview.getvisibility() == view.visible){                  mwebview.setvisibility(view.invisible);              }             else{                 mwebview.setvisibility(view.visible);             }           }     }); 

}

how can this? :)

use webview.removeallviews() remove views webview


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -