android - Why is my button creating a white screen? -
ok i'm running tabhost app webview on each tab, each webview url ends ?id= , on tab 5 have textview , button when user types in value saves , loads value @ end of ?id=, when press button opens blank white screen , makes tab host disappear instead of reloading of tabs new webview url. why opening new blank white screen?
tab 5, text view , button
public class tab5 extends activity{ protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.tab5); button btngo; btngo = (button) findviewbyid(r.id.button1); final edittext edit = (edittext) findviewbyid(r.id.edittext1); btngo.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { intent intent = new intent(tab5.this, tab1.class); intent.putextra("com.sideresult.outputapps.name", edit.gettext().tostring()); startactivity(intent); } }); }
example of 1 of webview tabs
public class tab1 extends activity { private webview webview; public final static string url = "outputapps.com/build/infoview.php?id="; public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.tab1); webview = (webview) findviewbyid(r.id.webview1); webview.getsettings().setjavascriptenabled(true); intent intent = getintent(); string name = intent.getstringextra("com.sideresult.outputapps.name"); webview.loadurl(tab1.url + name); webview.setwebviewclient(new myappwebviewclient()); websettings settings = webview.getsettings(); settings.setloadwithoverviewmode(true); settings.setusewideviewport(true); }
Comments
Post a Comment