fix datetime layout for phones and remove orientation locking
The first fixes the bug, the second was something I noticed
while debugging. We're no longer locking setup wizard orientation
for anything screen size, and so no activities it calls needs
to do that any more, either.
bug: 5642402
Change-Id: I5911223112a19841f6b4754a70148f28a753f736
diff --git a/res/layout/date_time_settings_setupwizard.xml b/res/layout/date_time_settings_setupwizard.xml
index 95402cb..d05098a 100644
--- a/res/layout/date_time_settings_setupwizard.xml
+++ b/res/layout/date_time_settings_setupwizard.xml
@@ -20,6 +20,13 @@
android:layout_width="fill_parent"
android:orientation="vertical">
+ <View
+ android:id="@+id/timezone_dropdown_anchor"
+ android:layout_width="match_parent"
+ android:layout_marginLeft="20dip"
+ android:layout_marginRight="20dip"
+ android:layout_height="0px" />
+
<LinearLayout android:layout_height="0px"
android:layout_weight="1"
android:layout_width="fill_parent"
diff --git a/src/com/android/settings/DateTimeSettingsSetupWizard.java b/src/com/android/settings/DateTimeSettingsSetupWizard.java
index e63153e..977d6c6 100644
--- a/src/com/android/settings/DateTimeSettingsSetupWizard.java
+++ b/src/com/android/settings/DateTimeSettingsSetupWizard.java
@@ -88,10 +88,8 @@
// not present in the standard layout
mUsingXLargeLayout = findViewById(R.id.time_zone_button) != null;
if (mUsingXLargeLayout) {
- setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
initUiForXl();
} else {
- setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT);
findViewById(R.id.next_button).setOnClickListener(this);
}
mTimeZoneAdapter = ZonePicker.constructTimezoneAdapter(this, false,