summaryrefslogtreecommitdiffstats
path: root/docs/html/guide/tutorials
diff options
context:
space:
mode:
authorTrevor Johns <trevorjohns@google.com>2011-01-20 13:04:17 -0800
committerTrevor Johns <trevorjohns@google.com>2011-01-20 13:04:17 -0800
commitb99d136f255d9f9270d4d1e224bd48030a9e6fb2 (patch)
tree433d5feace6ad9ef21a0407aec12505c89e47f50 /docs/html/guide/tutorials
parent1415bb7a948e0add9f6beb6dccbea70e9d2bedd0 (diff)
downloadframeworks_base-b99d136f255d9f9270d4d1e224bd48030a9e6fb2.zip
frameworks_base-b99d136f255d9f9270d4d1e224bd48030a9e6fb2.tar.gz
frameworks_base-b99d136f255d9f9270d4d1e224bd48030a9e6fb2.tar.bz2
Fixing bugs in HelloWebView tutorial on developer.android.com.
- Top-level LinearLayout needs to fill_parent, rather than wrap_content, otherwise the child WebView has 0 width - setWebViewClient() needs to construct a new HelloWebViewClient, not WebViewClientDemo (which doens't exist). Change-Id: Ie8b14e0cbf2b498573e965ccfc27b858dedabfa0
Diffstat (limited to 'docs/html/guide/tutorials')
-rw-r--r--docs/html/guide/tutorials/views/hello-webview.jd6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/html/guide/tutorials/views/hello-webview.jd b/docs/html/guide/tutorials/views/hello-webview.jd
index c4388ea..a927b04 100644
--- a/docs/html/guide/tutorials/views/hello-webview.jd
+++ b/docs/html/guide/tutorials/views/hello-webview.jd
@@ -12,8 +12,8 @@ we'll create a simple Activity that can view web pages.</p>
<pre>
&lt;?xml version="1.0" encoding="utf-8"?>
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
android:orientation="vertical">
&lt;WebView
@@ -69,7 +69,7 @@ private class HelloWebViewClient extends WebViewClient {
<li>Now, in the <code>onCreate()</code> method, set an instance of the <code>HelloWebViewClient</code>
as our WebViewClient:
- <pre>webview.setWebViewClient(new WebViewClientDemo());</pre>
+ <pre>webview.setWebViewClient(new HelloWebViewClient());</pre>
<p>This line should immediately follow the initialization of our WebView object.</p>
<p>What we've done is create a WebViewClient that will load any URL selected in our