Do. Net of. Android development environment somehow, find a shortcut?
How to achieve.
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Do. Net of. Today, just about this.
There is not a command, like. Net of response.redirect "www.csdn.net" such an order
Some words should be written in:
protected void onCreate (Bundle savedInstanceState) {
super.onCreate (savedInstanceState);
setContentView (R.layout.activity_main);
if (savedInstanceState == null) {
getSupportFragmentManager (). beginTransaction ()
. Add (R.id.container, new PlaceholderFragment ())
. Commit ();
}
} Here, right?
Reply:
webView
Reply:
Under their own roof ~
Reply:
By webview to achieve, which is android built-in browser, or open your apk in other browsers by calling
Reply:
Or by phonegap jquery mobile, web, and you develop almost
Reply:
You can top yourself about it?
Reply:
Under the browser to call your company website URL code written on the line connecting
Reply:
Write a complete test okay.
package com.example.testapp;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.os.Bundle;
import android.view.KeyEvent;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class MainActivity extends Activity {
private WebView webView = null;
@ SuppressLint ("SetJavaScriptEnabled")
@ Override
protected void onCreate (Bundle savedInstanceState) {
super.onCreate (savedInstanceState);
webView = new WebView (this);
webView.loadUrl ("http://baidu.com");
webView.getSettings () setJavaScriptEnabled (true);.
/ / NA external browser to access web pages directly in the program
webView.setWebViewClient (new WebViewClient () {
@ Override
public boolean shouldOverrideUrlLoading (WebView view, String url) {/ / override this method that click on the link inside pages or jump in the current webview, and did not jump to the browser side
view.loadUrl (url);
return true;
}
});
setContentView (webView);
}
public boolean onKeyDown (int keyCode, KeyEvent event) {
if ((keyCode == KeyEvent.KEYCODE_BACK) && webView.canGoBack ()) {
webView.goBack ();
return true;
}
return super.onKeyDown (keyCode, event);
}
}
Need to add access permissions
Reply:
webView
No comments:
Post a Comment