Permalink
Browse files

create webview to load tech hui

  • Loading branch information...
1 parent 3811421 commit f42d7283f55bf6647036b4bc44a5743cb3b65518 @axelson axelson committed Dec 6, 2011
Showing with 18 additions and 4 deletions.
  1. +1 −0 AndroidManifest.xml
  2. +9 −0 res/layout/webview.xml
  3. +8 −4 src/org/hicapacity/techhui/SongsActivity.java
View
@@ -4,6 +4,7 @@
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="8" />
+ <uses-permission android:name="android.permission.INTERNET" />
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".TechHuiActivity"
View
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<WebView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/webview"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+</WebView>
@@ -2,18 +2,22 @@
import android.app.Activity;
import android.os.Bundle;
-import android.widget.TextView;
+import android.webkit.WebView;
/**
* @author Jason Axelson
*
*/
public class SongsActivity extends Activity {
+ WebView mWebView;
+
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ setContentView(R.layout.webview);
- TextView textview = new TextView(this);
- textview.setText("This is the songs tab");
- setContentView(textview);
+ mWebView = (WebView) findViewById(R.id.webview);
+ System.out.println("webview is: " + mWebView);
+ mWebView.getSettings().setJavaScriptEnabled(true);
+ mWebView.loadUrl("http://www.techhui.com");
}
}

0 comments on commit f42d728

Please sign in to comment.