Browse Source

Add WebView to intro activity

master
Chris Smith 14 years ago
parent
commit
ce3ad9dc9e

+ 3
- 3
code/ContextAnalyser/res/layout/main.xml View File

@@ -3,8 +3,8 @@
3 3
     android:orientation="vertical"
4 4
     android:layout_width="fill_parent"
5 5
     android:layout_height="fill_parent">" 
6
-    <TextView
6
+    <WebView
7 7
         android:layout_width="fill_parent"
8
-        android:layout_height="wrap_content"
9
-        android:text="Hello Android from NetBeans"/>
8
+        android:layout_height="fill_parent"
9
+        android:id="@+id/webview"/>
10 10
 </LinearLayout>

+ 6
- 0
code/ContextAnalyser/src/uk/co/md87/android/contextanalyser/IntroActivity.java View File

@@ -25,6 +25,7 @@ package uk.co.md87.android.contextanalyser;
25 25
 import android.app.Activity;
26 26
 import android.content.Intent;
27 27
 import android.os.Bundle;
28
+import android.webkit.WebView;
28 29
 
29 30
 /**
30 31
  *
@@ -37,6 +38,11 @@ public class IntroActivity extends Activity {
37 38
     public void onCreate(Bundle icicle) {
38 39
         super.onCreate(icicle);
39 40
 
41
+        setContentView(R.layout.main);
42
+
43
+        final WebView webview = (WebView) findViewById(R.id.webview);
44
+        webview.loadUrl("http://chris.smith.name/android/contextanalyser/");
45
+
40 46
         startService(new Intent(this, ContextAnalyserService.class));
41 47
     }
42 48
 

+ 3
- 0
code/ContextAnalyser/src/uk/co/md87/android/contextanalyser/R.java View File

@@ -13,6 +13,9 @@ public final class R {
13 13
     public static final class drawable {
14 14
         public static final int icon=0x7f020000;
15 15
     }
16
+    public static final class id {
17
+        public static final int webview=0x7f060000;
18
+    }
16 19
     public static final class layout {
17 20
         public static final int main=0x7f030000;
18 21
     }

Loading…
Cancel
Save