Permalink
Browse files

# Refactoring (removed detour via layout.xml)

  • Loading branch information...
1 parent 8ba24b7 commit b094f300f026bffdea8fd41313823dd7d21d84e9 Phil. Austermann committed May 25, 2012
Showing with 3 additions and 15 deletions.
  1. +0 −13 res/layout/main.xml
  2. +3 −2 src/com/changeit/dtpolyfill/MainActivity.java
View
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- >
- <WebView
- android:id="@+id/webView"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- />
- </LinearLayout>
-
@@ -12,11 +12,12 @@
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
- WebView webview = (WebView) this.findViewById(R.id.webView);
+ WebView webview = new WebView(this);
webview.setWebViewClient(new WebClient());
webview.getSettings().setJavaScriptEnabled(true);
webview.loadUrl("file:///android_asset/www/index.html");
+
+ setContentView(webview);
}
}

0 comments on commit b094f30

Please sign in to comment.