I am currently writing a webview, it first loads a twitter page (say, NHL, http://twitter.com/nhl) as you can see, you can find the tweet for NHL, and each NHL tweet has ano
You can control this through the WebViewClient class. Simply extend it and override the default implementation to get the desired configuration then set it as the client for your current webview.
Activity
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// set the webViewClient to a new instance of your custom WebViewClient
webview.setWebViewClient(new WebActivityClient( this ));
}
Custom Client
/** WebViewClient class for WebView in WebActivity */
private class WebActivityClient extends WebViewClient {
public static final String TAG = "WebActivityClient";
private Context context;
/** Constructor used to grab the context */
public WebActivityClient( Context context ) {
this.context = context;
}
/** Override to load every link within the page inside this webview instead of using
* android's default application
* #7 http://developer.android.com/resources/tutorials/views/hello-webview.html */
@Override
public boolean shouldOverrideUrlLoading( WebView view, String url ) {
view.loadUrl(url);
return true;
}
}
Hope this helps!