Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>What you describe can be easily accomplished using a <code>WebView</code>.</p> <p><strong><code>WebView</code> (from <a href="http://developer.android.com/reference/android/webkit/WebView.html" rel="noreferrer">android developers</a>)</strong> : A View that displays web pages. This class is the basis upon which you can roll your own web browser or simply display some online content within your Activity. It uses the WebKit rendering engine to display web pages and includes methods to navigate forward and backward through a history, zoom in and out, perform text searches and more.</p> <p>Here's a simple sample app:</p> <pre><code>public class WebActivity extends Activity { WebView mWebView; @Override public void onCreate(Bundle savedInstanceState) { final Activity mActivity = this; super.onCreate(savedInstanceState); // Adds Progrss bar Support this.getWindow().requestFeature(Window.FEATURE_PROGRESS); setContentView(R.layout.main); // Makes Progress bar Visible getWindow().setFeatureInt( Window.FEATURE_PROGRESS, Window.PROGRESS_VISIBILITY_ON); mWebView = (WebView) findViewById( R.id.webview ); mWebView.getSettings().setJavaScriptEnabled(true); mWebView.loadUrl(http://your.url.com); mWebView.setWebChromeClient(new WebChromeClient() { public void onProgressChanged(WebView view, int progress) { //Make the bar disappear after URL is loaded, and changes string to Loading... mActivity .setTitle("Loading..."); mActivity .setProgress(progress * 100); //Make the bar disappear after URL is loaded // Return the app name after finish loading if(progress == 100) { financialPortalActivity.setTitle(R.string.yourWebSiteName); } } }); } } </code></pre> <p>and a very simple layout file: main.xml</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"&gt; &lt;WebView android:id="@+id/webview" android:layout_width="fill_parent" android:layout_height="fill_parent" /&gt; &lt;/LinearLayout&gt; </code></pre> <p>Of course you will have to set a permission in your Manifest:</p> <pre><code> &lt;uses-permission android:name="android.permission.INTERNET" /&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload