I had the problem with webview, i.e when I click on a link , it used
to take me to a new browser window. I wanted the link to be open on
the same window. So I used this code posted somewhere on this forum.
But now I have new problem. With this code, I am getting a
"SocketException : Broken Pipe". With the Bowser, I had no such
problems. Any one any clues???
Thanks
public class myLesson extends Activity {
WebView myWebView;
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.layout_web);
myWebView=(WebView)findViewById(R.id.webview);
myWebView.setWebViewClient(new Callback());
loadTime();
}
void loadTime() {
// myMMFString has a simple html string with a link
myWebView.loadDataWithBaseURL("x-data://base", myMMFString,
"text/html", "UTF-8",
null);
}
private class Callback extends WebViewClient {
public boolean shouldOverrideUrlLoading(WebView view, String
url) {
loadTime();
return(false);
}
}
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---