am d671182d: Merge "make setup wizard\'s wifi and datetime settings look good for 7"" into honeycomb-mr2

* commit 'd671182d88a193bee25d82a1941a57a84ed0fdc4':
  make setup wizard's wifi and datetime settings look good for 7"
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 7879d0c..7e7bf1d 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -138,7 +138,6 @@
                   android:theme="@android:style/Theme.Holo.NoActionBar"
                   android:windowBackground="@drawable/setups_bg_default"
                   android:clearTaskOnLaunch="true"
-                  android:screenOrientation="sensorLandscape"
                   android:windowSoftInputMode="adjustResize"
                   android:exported="true" />
 
diff --git a/res/layout-xlarge/date_time_settings_setupwizard.xml b/res/layout-sw600dp-land/date_time_settings_setupwizard.xml
similarity index 96%
rename from res/layout-xlarge/date_time_settings_setupwizard.xml
rename to res/layout-sw600dp-land/date_time_settings_setupwizard.xml
index ee425eb..b31462d 100644
--- a/res/layout-xlarge/date_time_settings_setupwizard.xml
+++ b/res/layout-sw600dp-land/date_time_settings_setupwizard.xml
@@ -19,10 +19,10 @@
     android:orientation="vertical"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:paddingTop="154dip"
-    android:paddingLeft="128dip"
-    android:paddingRight="128dip"
-    android:paddingBottom="96dip">
+    android:paddingTop="@dimen/datetime_margin_top"
+    android:paddingLeft="@dimen/screen_margin_sides"
+    android:paddingRight="@dimen/screen_margin_sides"
+    android:paddingBottom="@dimen/datetime_margin_bottom">
 
     <!-- Title: Set date & time-->
     <TextView
diff --git a/res/layout-xlarge/wifi_settings_for_setup_wizard_xl.xml b/res/layout-sw600dp-land/wifi_settings_for_setup_wizard_xl.xml
similarity index 98%
rename from res/layout-xlarge/wifi_settings_for_setup_wizard_xl.xml
rename to res/layout-sw600dp-land/wifi_settings_for_setup_wizard_xl.xml
index f755563..7c5b274 100644
--- a/res/layout-xlarge/wifi_settings_for_setup_wizard_xl.xml
+++ b/res/layout-sw600dp-land/wifi_settings_for_setup_wizard_xl.xml
@@ -21,8 +21,8 @@
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
     android:paddingTop="60dip"
-    android:paddingLeft="128dip"
-    android:paddingRight="128dip"
+    android:paddingLeft="@dimen/screen_margin_sides"
+    android:paddingRight="@dimen/screen_margin_sides"
     android:paddingBottom="0dip" >
 
     <FrameLayout
diff --git a/res/layout-xlarge/access_point_category_for_setup_wizard_xl.xml b/res/layout-sw600dp/access_point_category_for_setup_wizard_xl.xml
similarity index 100%
rename from res/layout-xlarge/access_point_category_for_setup_wizard_xl.xml
rename to res/layout-sw600dp/access_point_category_for_setup_wizard_xl.xml
diff --git a/res/layout-xlarge/date_time_settings_setupwizard.xml b/res/layout-sw600dp/date_time_settings_setupwizard.xml
similarity index 96%
copy from res/layout-xlarge/date_time_settings_setupwizard.xml
copy to res/layout-sw600dp/date_time_settings_setupwizard.xml
index ee425eb..b31462d 100644
--- a/res/layout-xlarge/date_time_settings_setupwizard.xml
+++ b/res/layout-sw600dp/date_time_settings_setupwizard.xml
@@ -19,10 +19,10 @@
     android:orientation="vertical"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:paddingTop="154dip"
-    android:paddingLeft="128dip"
-    android:paddingRight="128dip"
-    android:paddingBottom="96dip">
+    android:paddingTop="@dimen/datetime_margin_top"
+    android:paddingLeft="@dimen/screen_margin_sides"
+    android:paddingRight="@dimen/screen_margin_sides"
+    android:paddingBottom="@dimen/datetime_margin_bottom">
 
     <!-- Title: Set date & time-->
     <TextView
diff --git a/res/layout-xlarge/settings_top_level.xml b/res/layout-sw600dp/settings_top_level.xml
similarity index 100%
rename from res/layout-xlarge/settings_top_level.xml
rename to res/layout-sw600dp/settings_top_level.xml
diff --git a/res/layout-xlarge/wifi_settings_for_setup_wizard_xl.xml b/res/layout-sw600dp/wifi_settings_for_setup_wizard_xl.xml
similarity index 76%
copy from res/layout-xlarge/wifi_settings_for_setup_wizard_xl.xml
copy to res/layout-sw600dp/wifi_settings_for_setup_wizard_xl.xml
index f755563..d6df897 100644
--- a/res/layout-xlarge/wifi_settings_for_setup_wizard_xl.xml
+++ b/res/layout-sw600dp/wifi_settings_for_setup_wizard_xl.xml
@@ -21,8 +21,8 @@
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
     android:paddingTop="60dip"
-    android:paddingLeft="128dip"
-    android:paddingRight="128dip"
+    android:paddingLeft="@dimen/screen_margin_sides"
+    android:paddingRight="@dimen/screen_margin_sides"
     android:paddingBottom="0dip" >
 
     <FrameLayout
@@ -177,52 +177,62 @@
         android:layout_alignLeft="@id/content"
         android:background="@color/divider_color" />  <!-- TODO: fix this -->
 
-    <RelativeLayout
+    <LinearLayout
         android:id="@+id/bottom_buttons"
+        android:orientation="vertical"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_below="@id/bottom_divider"
-        android:layout_alignLeft="@id/bottom_divider"
-        android:layout_alignParentRight="true"
-        android:layout_alignParentBottom="true">
+        android:layout_alignLeft="@id/bottom_divider">
 
-        <Button
-            android:id="@+id/wifi_setup_add_network"
-            style="@style/setup_wizard_button"
-            android:layout_alignParentLeft="true"
-            android:text="@string/wifi_setup_add_network"
-            android:enabled="false" />
-
-        <LinearLayout
-            android:layout_width="wrap_content"
+        <RelativeLayout
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
+            android:layout_below="@id/bottom_divider"
+            android:layout_alignLeft="@id/bottom_divider"
             android:layout_alignParentRight="true"
-            android:orientation="horizontal">
+            android:layout_alignParentBottom="true">
 
-            <!-- This misleading name is for keeping consistency between non-XL
-                 layouts -->
-            <Button android:id="@+id/wifi_setup_cancel"
-                    style="@style/setup_wizard_button"
-                    android:text="@string/wifi_setup_back"
-                    android:visibility="gone" />
+            <Button
+                android:id="@+id/wifi_setup_add_network"
+                style="@style/setup_wizard_button"
+                android:layout_alignParentLeft="true"
+                android:text="@string/wifi_setup_add_network"
+                android:enabled="false" />
 
-            <Button android:id="@+id/wifi_setup_connect"
-                    style="@style/setup_wizard_button"
-                    android:layout_marginLeft="16dip"
-                    android:text="@string/wifi_setup_connect"
-                    android:enabled="false"
-                    android:visibility="gone" />
+            <LinearLayout
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentRight="true"
+                android:orientation="horizontal">
 
-            <Button android:id="@+id/wifi_setup_refresh_list"
-                    style="@style/setup_wizard_button"
-                    android:layout_marginLeft="16dip"
-                    android:text="@string/wifi_setup_refresh_list"
-                    android:enabled="false" />
+                <!-- This misleading name is for keeping consistency between non-XL
+                     layouts -->
+                <Button android:id="@+id/wifi_setup_cancel"
+                        style="@style/setup_wizard_button"
+                        android:text="@string/wifi_setup_back"
+                        android:visibility="gone" />
 
-            <Button android:id="@+id/wifi_setup_skip_or_next"
-                    style="@style/setup_wizard_button"
-                    android:layout_marginLeft="16dip"
-                    android:text="@string/wifi_setup_skip" />
-        </LinearLayout>
-    </RelativeLayout>
+                <Button android:id="@+id/wifi_setup_connect"
+                        style="@style/setup_wizard_button"
+                        android:layout_marginLeft="16dip"
+                        android:text="@string/wifi_setup_connect"
+                        android:enabled="false"
+                        android:visibility="gone" />
+
+                <Button android:id="@+id/wifi_setup_skip_or_next"
+                        style="@style/setup_wizard_button"
+                        android:layout_marginLeft="16dip"
+                        android:text="@string/wifi_setup_skip" />
+            </LinearLayout>
+
+        </RelativeLayout>
+
+        <Button android:id="@+id/wifi_setup_refresh_list"
+                style="@style/setup_wizard_button"
+                android:layout_alignParentRight="true"
+                android:text="@string/wifi_setup_refresh_list"
+                android:enabled="false" />
+
+    </LinearLayout>
 </RelativeLayout>
diff --git a/res/values-sw600dp-land/dimens.xml b/res/values-sw600dp-land/dimens.xml
new file mode 100755
index 0000000..9bd2336
--- /dev/null
+++ b/res/values-sw600dp-land/dimens.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<resources>
+    <dimen name="screen_margin_sides">128dip</dimen>
+</resources>
diff --git a/res/values-xlarge/bools.xml b/res/values-sw600dp/bools.xml
similarity index 100%
rename from res/values-xlarge/bools.xml
rename to res/values-sw600dp/bools.xml
diff --git a/res/values-xlarge/colors.xml b/res/values-sw600dp/colors.xml
similarity index 100%
rename from res/values-xlarge/colors.xml
rename to res/values-sw600dp/colors.xml
diff --git a/res/values-sw600dp/dimens.xml b/res/values-sw600dp/dimens.xml
new file mode 100755
index 0000000..bc9f18d
--- /dev/null
+++ b/res/values-sw600dp/dimens.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<resources>
+    <dimen name="screen_margin_sides">40dip</dimen>
+    <dimen name="datetime_margin_top">40dip</dimen>
+    <dimen name="datetime_margin_bottom">40dip</dimen>
+</resources>
diff --git a/res/values-xlarge/styles.xml b/res/values-sw600dp/styles.xml
similarity index 100%
rename from res/values-xlarge/styles.xml
rename to res/values-sw600dp/styles.xml
diff --git a/res/values-xlarge/dimens.xml b/res/values-xlarge/dimens.xml
new file mode 100755
index 0000000..b6b4591
--- /dev/null
+++ b/res/values-xlarge/dimens.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<resources>
+    <dimen name="screen_margin_sides">128dip</dimen>
+    <dimen name="datetime_margin_top">154dip</dimen>
+    <dimen name="datetime_margin_bottom">96dip</dimen>
+</resources>
diff --git a/src/com/android/settings/DateTimeSettingsSetupWizard.java b/src/com/android/settings/DateTimeSettingsSetupWizard.java
index ec9c2af..670fcbc 100644
--- a/src/com/android/settings/DateTimeSettingsSetupWizard.java
+++ b/src/com/android/settings/DateTimeSettingsSetupWizard.java
@@ -76,7 +76,7 @@
         setContentView(R.layout.date_time_settings_setupwizard);
         mXLargeScreenSize = (getResources().getConfiguration().screenLayout
                 & Configuration.SCREENLAYOUT_SIZE_MASK)
-                == Configuration.SCREENLAYOUT_SIZE_XLARGE;
+                >= Configuration.SCREENLAYOUT_SIZE_LARGE;
         if (mXLargeScreenSize) {
             initUiForXl();
         } else {