Thursday, April 24, 2014

Android how a call to the start method JS


I added a button, click the button he can perform JS function in onCreate () does not perform in, I want him to start execution
 protected void onCreate (Bundle savedInstanceState) {
super.onCreate (savedInstanceState);
requestWindowFeature (Window.FEATURE_NO_TITLE);
setContentView (R.layout.activity_chart_line2_d_06);
wv = (WebView) findViewById (R.id.webView1);
wv.getSettings () setJavaScriptEnabled (true);.
wv.getSettings () setUseWideViewPort (true);.
wv.getSettings () setSupportZoom (true);.
wv.getSettings () setBuiltInZoomControls (true);.
wv.getSettings () setLoadWithOverviewMode (true);.
wv.requestFocus ();
wv.loadUrl ("file :/ / / android_asset/line2d_06.html");
/ / Wv.loadUrl ("javascript: settitle ()");

a (null);


}

 
public void a (View view) {
new Thread (new Runnable () {

@ Override
public void run () {
/ / TODO Auto-generated method stub
wv.loadUrl ("javascript: settitle ()");
}
}) {

.} Start ();
}
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
a (null); / / findViewById (R.id.button1) performClick ().;
Reply:
No,,,,,
Reply:
Should be finished webview not loaded directly modify html source code it

Reply:
So no sense, I still need to pass data from the background, I think it was not loaded when he finished an error unknow chormium error -6
Reply:
Before I could, using the thread, then deleted, and then forgot to do it again would not be re-

No comments:

Post a Comment