Split UI based on screen size

      Different UI implementation for normal and xlarge screens

Change-Id: I8217ffd16e1f87b248a22426b17fa34b3a4f89df
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 7c0f7c8..8282eb0 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -93,7 +93,14 @@
         }
 
         mController = new Controller(this);
-        mUi = new BaseUi(this, mController);
+        boolean xlarge = (getResources().getConfiguration().screenLayout
+                & Configuration.SCREENLAYOUT_SIZE_MASK)
+                == Configuration.SCREENLAYOUT_SIZE_XLARGE;
+        if (xlarge) {
+            mUi = new XLargeUi(this, mController);
+        } else {
+            mUi = new PhoneUi(this, mController);
+        }
         mController.setUi(mUi);
         mController.setWebViewFactory((BaseUi) mUi);