Adjusted the screen size test to fall back to phone version of DateTimeSettingsSetupWizard on large screens. I made the following changes from how the phone version works: 1. Some layout changes. (Tablet look, bigger margins.) 2. Use zone picker to select time zone. 3. Added isFirstRun boolean extra to hide the pref fields we don't need to see from setup wizard Furthermore, I made the following fixes to the existing phone flow (which had probably never yet been tried on a phone): 1. Added conditionals around access to some variables that only exist in the xlarge layout. 2. Implemented PreferenceFragment.OnPreferenceStartFragmentCallback in DateTimeSettingsSetupWizard in order to catch the user tapping on the timezone preference and show the time zone picker popup. (Note: for phones in ICS, we might want to launch the zone picker preferences style, like it would have been had this been a PreferenceActivity. Or maybe we should just create a separate DateTimeSettingsSetupWizardPhone activity that subclasses PreferencesActivity and doesn't need to play this trick.) Change-Id: Ib5774a005c9f44d730d86c13746d91eb712141cc
69 lines
2.6 KiB
XML
69 lines
2.6 KiB
XML
<?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.
|
|
-->
|
|
|
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:id="@+id/layout_root"
|
|
android:layout_height="match_parent"
|
|
android:layout_width="match_parent"
|
|
android:paddingTop="96dip"
|
|
android:paddingLeft="40dip"
|
|
android:paddingRight="40dip"
|
|
android:paddingBottom="96dip"
|
|
android:orientation="vertical">
|
|
|
|
<FrameLayout android:id="@+id/timezone_dropdown_anchor"
|
|
android:layout_height="0px"
|
|
android:layout_width="match_parent"
|
|
android:layout_marginLeft="40dip"
|
|
android:layout_marginRight="40dip"/>
|
|
|
|
<LinearLayout android:layout_height="0px"
|
|
android:layout_weight="1"
|
|
android:layout_width="match_parent"
|
|
android:orientation="vertical">
|
|
|
|
<fragment android:id="@+id/date_time_settings_fragment"
|
|
class="com.android.settings.DateTimeSettings"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent" />
|
|
|
|
</LinearLayout>
|
|
|
|
<RelativeLayout android:layout_height="wrap_content"
|
|
android:layout_weight="0"
|
|
android:layout_width="match_parent">
|
|
|
|
<View
|
|
android:id="@+id/bottom_divider"
|
|
android:layout_height="3dip"
|
|
android:layout_width="match_parent"
|
|
android:layout_marginTop="0dip"
|
|
android:layout_marginBottom="16dip"
|
|
android:background="@color/divider_color"
|
|
android:layout_above="@+id/next_button"/>
|
|
|
|
<Button android:id="@+id/next_button"
|
|
android:layout_width="wrap_content"
|
|
android:minWidth="208dip"
|
|
android:layout_height="48dip"
|
|
android:layout_marginTop="10dip"
|
|
android:layout_alignParentRight="true"
|
|
android:text="@string/next_label"/>
|
|
|
|
</RelativeLayout>
|
|
|
|
</LinearLayout>
|