when i try to run the following code i get a white screen....
what am i doing wrong?
am i supposed to fire it off as an intent activity? e.g. new Intent(this, WebViewTest.class)
thanks
AndroidManifest.xml
Using xml Syntax Highlighting
- <?xml version="1.0" encoding="utf-8"?>
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.test"
- android:versionCode="1"
- android:versionName="1.0.0">
- <uses-permission android:name="android.permission.INTERNET" />
- ....
Parsed in 0.001 seconds, using GeSHi 1.0.8.4
main.xml
Using xml Syntax Highlighting
- <LinearLayout
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
- <TabWidget
- android:id="@android:id/tabs"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content" />
- <FrameLayout
- android:id="@android:id/tabcontent"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
- <TextView
- android:id="@+id/textview"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:text="this is a third tab"
- />
- </FrameLayout>
- </LinearLayout>
- <WebView
- android:id="@+id/webview"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- />
Parsed in 0.003 seconds, using GeSHi 1.0.8.4
WebViewTest.java
- Code: Select all
public class WebViewTest extends Activity {
WebView webview;
public WebViewTest(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
webview = (WebView) findViewById(R.id.webview);
webview.getSettings().setJavaScriptEnabled(true);
webview.loadUrl("http://www.google.com/m");
}
}



