Refresh layouts for SetupWizard.
- DateTimeSettingsSetupWizardXL - WifiSettingsForSetupWizardXL Bug: 3308677, 3137755 Change-Id: Ifdf67aa7521de7ef0286fea2b15ce693fbf5d5ce
This commit is contained in:
@@ -13,27 +13,29 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<!-- TODO: too many LinearLayout. -->
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingTop="60dip"
|
||||
android:paddingLeft="100dip"
|
||||
android:paddingRight="100dip"
|
||||
android:paddingBottom="40dip">
|
||||
android:paddingTop="96dip"
|
||||
android:paddingLeft="128dip"
|
||||
android:paddingRight="128dip"
|
||||
android:paddingBottom="96dip">
|
||||
|
||||
<!-- Title: Set date & time-->
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="48dip"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginLeft="16dip"
|
||||
android:layout_alignParentTop="true"
|
||||
android:textSize="40dip"
|
||||
android:textSize="30dip"
|
||||
android:textColor="#FF99cc00"
|
||||
android:text="@string/date_and_time_settings_title"/>
|
||||
android:text="@string/date_and_time_settings_title"
|
||||
android:gravity="center_vertical" />
|
||||
|
||||
<!-- Divider -->
|
||||
<View
|
||||
@@ -41,111 +43,105 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_below="@id/title"
|
||||
android:background="@color/divider_color"
|
||||
android:layout_marginBottom="5dip" />
|
||||
android:background="@color/divider_color" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/top_divider"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginTop="60dip"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- left: timezone -->
|
||||
<LinearLayout
|
||||
android:layout_width="0px"
|
||||
android:layout_weight=".48"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<!-- text should manually be set. -->
|
||||
<!-- timezone -->
|
||||
<Button
|
||||
android:id="@+id/time_zone_button"
|
||||
android:layout_width="400dip"
|
||||
android:layout_height="60dip"
|
||||
android:textSize="24dip" />
|
||||
<!-- <LinearLayout android:id="@+id/zone_picker"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="350dip"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:clickable="true">
|
||||
<fragment android:id="@+id/zone_picker_fragment"
|
||||
class="com.android.settings.ZonePicker"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout> -->
|
||||
</LinearLayout>
|
||||
style="?android:attr/dropDownSpinnerStyle"
|
||||
android:layout_width="304dip"
|
||||
android:layout_height="48dip"
|
||||
android:layout_below="@id/top_divider"
|
||||
android:layout_marginTop="48dip"
|
||||
android:layout_marginLeft="16dip"
|
||||
android:paddingLeft="16dip"
|
||||
android:paddingTop="0dip"
|
||||
android:paddingBottom="0dip"
|
||||
android:gravity="left|center"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<!-- spacer on center -->
|
||||
<View
|
||||
android:layout_width="0px"
|
||||
android:layout_weight=".04"
|
||||
android:layout_height="0dip"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<!-- right: DateTime -->
|
||||
<RelativeLayout
|
||||
android:layout_width="0px"
|
||||
android:layout_weight=".48"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<CheckBox
|
||||
<LinearLayout
|
||||
android:id="@+id/date_time_auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="624dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:gravity="left"
|
||||
android:textSize="22dip"
|
||||
android:text="@string/date_time_auto" />
|
||||
android:orientation="vertical"
|
||||
android:layout_below="@id/top_divider"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="32dip"
|
||||
android:layout_marginRight="16dip"
|
||||
android:layout_marginBottom="48dip">
|
||||
|
||||
<Switch
|
||||
android:id="@+id/date_time_auto_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:layout_marginLeft="16dip"
|
||||
android:layout_marginRight="16dip"
|
||||
android:text="@string/date_time_auto"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<!-- Divider -->
|
||||
<View
|
||||
android:id="@+id/datetime_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_below="@id/date_time_auto"
|
||||
android:background="@color/divider_color"
|
||||
android:layout_marginTop="15dip"
|
||||
android:layout_marginBottom="80dip" />
|
||||
android:background="@color/divider_color" />
|
||||
</LinearLayout>
|
||||
|
||||
<TimePicker
|
||||
android:id="@+id/time_picker"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_below="@id/datetime_divider" />
|
||||
<TextView
|
||||
android:id="@+id/date_picker_title"
|
||||
android:layout_width="312dip"
|
||||
android:layout_height="48dip"
|
||||
android:layout_toLeftOf="@+id/time_picker_title"
|
||||
android:layout_below="@id/date_time_auto"
|
||||
android:text="@string/date_picker_title"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:gravity="center" />
|
||||
|
||||
<DatePicker
|
||||
android:id="@+id/date_picker"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="312dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@+id/time_picker"
|
||||
android:layout_below="@id/date_picker_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/time_picker_title"
|
||||
android:layout_width="312dip"
|
||||
android:layout_height="48dip"
|
||||
android:layout_below="@id/date_time_auto"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="@string/time_picker_title"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:gravity="center" />
|
||||
|
||||
<TimePicker
|
||||
android:id="@+id/time_picker"
|
||||
android:layout_width="312dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_below="@id/datetime_divider" />
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
android:layout_below="@id/time_picker_title" />
|
||||
|
||||
<!-- TODO: remove this button when we are sure it is needless -->
|
||||
<Button
|
||||
android:id="@+id/skip_button"
|
||||
android:layout_width="250dip"
|
||||
android:layout_height="80dip"
|
||||
android:layout_width="208dip"
|
||||
android:layout_height="48dip"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_toLeftOf="@+id/next_button"
|
||||
android:layout_marginRight="20dip"
|
||||
android:textSize="24dip"
|
||||
android:layout_marginRight="16dip"
|
||||
android:text="@string/skip_label"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/next_button"
|
||||
android:layout_width="250dip"
|
||||
android:layout_height="80dip"
|
||||
android:layout_width="208dip"
|
||||
android:layout_height="48dip"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:textSize="24dip"
|
||||
android:text="@string/next_label" />
|
||||
android:layout_marginRight="16dip"
|
||||
android:text="@string/next_label"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
@@ -13,69 +13,95 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:paddingTop="60dip"
|
||||
android:paddingLeft="100dip"
|
||||
android:paddingRight="100dip"
|
||||
android:paddingBottom="40dip">
|
||||
android:paddingTop="120dip"
|
||||
android:paddingLeft="96dip"
|
||||
android:paddingRight="96dip"
|
||||
android:paddingBottom="0dip" >
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="48dip"
|
||||
android:layout_alignParentTop="true">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/wifi_setup_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:textSize="40dip"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="16dip"
|
||||
android:textSize="30dip"
|
||||
android:textColor="#FF99cc00"
|
||||
android:text="@string/wifi_setup_title"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/scanning_progress_bar"
|
||||
android:layout_width="100dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/scanning_progress_text"
|
||||
android:layout_alignParentRight="true"
|
||||
style="?android:attr/progressBarStyleHorizontal" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/scanning_progress_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_above="@+id/top_divider"
|
||||
android:gravity="right"
|
||||
android:textSize="22dip"
|
||||
android:textColor="#ff40520f" />
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="16dip"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#6699cc00" />
|
||||
</RelativeLayout>
|
||||
|
||||
<!-- Divider -->
|
||||
<View
|
||||
<RelativeLayout
|
||||
android:id="@+id/top_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/title_bar">
|
||||
<ProgressBar
|
||||
android:id="@+id/scanning_progress_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="?android:attr/progressBarStyleHorizontal" />
|
||||
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_below="@id/wifi_setup_title"
|
||||
android:background="@color/divider_color"
|
||||
android:layout_marginBottom="5dip" />
|
||||
android:layout_alignBottom="@id/scanning_progress_bar"
|
||||
android:background="@color/divider_color" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/wifi_setup_status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/top_divider"
|
||||
android:layout_marginBottom="20dip"
|
||||
android:layout_marginLeft="5dip"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:text="@string/wifi_setup_status_select_network"/>
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginLeft="16dip"
|
||||
android:layout_marginTop="32dip"
|
||||
android:layout_marginBottom="0dip"
|
||||
android:text="@string/wifi_setup_status_select_network"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="138dip"
|
||||
android:layout_below="@+id/wifi_setup_status"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginTop="0dip"
|
||||
android:layout_marginLeft="16dip"
|
||||
android:layout_marginRight="16dip"
|
||||
android:layout_marginBottom="0dip">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/wifi_setup"
|
||||
android:layout_width="400dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_below="@+id/wifi_setup_status">
|
||||
android:layout_width="416dip"
|
||||
android:layout_height="383dip"
|
||||
android:paddingTop="16dip">
|
||||
<fragment
|
||||
class="com.android.settings.wifi.WifiSettings"
|
||||
android:id="@+id/wifi_setup_fragment"
|
||||
@@ -84,20 +110,21 @@
|
||||
</FrameLayout>
|
||||
<FrameLayout
|
||||
android:id="@+id/wifi_config_ui"
|
||||
android:layout_width="400dip"
|
||||
android:layout_width="416dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_below="@+id/wifi_setup_status"
|
||||
android:paddingTop="32dip"
|
||||
android:visibility="gone" />
|
||||
</FrameLayout>
|
||||
|
||||
<!-- TODO: should be removed -->
|
||||
<Button android:id="@+id/wifi_setup_detail"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/wifi_config_ui"
|
||||
android:layout_alignLeft="@id/wifi_config_ui"
|
||||
android:textSize="18dip"
|
||||
android:text="@string/wifi_setup_detail"
|
||||
android:gravity="left|center_vertical"
|
||||
android:text="@string/wifi_setup_detail"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:visibility="gone" />
|
||||
|
||||
<LinearLayout
|
||||
@@ -106,55 +133,62 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true">
|
||||
android:layout_marginRight="16dip"
|
||||
android:layout_alignBottom="@+id/content"
|
||||
android:layout_marginBottom="16dip">
|
||||
|
||||
<Button android:id="@+id/wifi_setup_forget"
|
||||
android:layout_width="260dip"
|
||||
android:layout_height="60dip"
|
||||
android:textSize="24dip"
|
||||
android:layout_width="208dip"
|
||||
android:layout_height="48dip"
|
||||
android:layout_marginLeft="16dip"
|
||||
android:text="@string/wifi_setup_forget"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Button android:id="@+id/wifi_setup_connect"
|
||||
android:layout_width="260dip"
|
||||
android:layout_height="60dip"
|
||||
android:layout_marginTop="20dip"
|
||||
android:textSize="24dip"
|
||||
android:layout_width="208dip"
|
||||
android:layout_height="48dip"
|
||||
android:layout_marginTop="96dip"
|
||||
android:layout_marginLeft="16dip"
|
||||
android:text="@string/wifi_setup_connect"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:enabled="false"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Button android:id="@+id/wifi_setup_add_network"
|
||||
android:layout_width="260dip"
|
||||
android:layout_height="60dip"
|
||||
android:textSize="24dip"
|
||||
android:layout_width="208dip"
|
||||
android:layout_height="48dip"
|
||||
android:layout_marginLeft="16dip"
|
||||
android:text="@string/wifi_setup_add_network"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:enabled="false" />
|
||||
|
||||
<Button android:id="@+id/wifi_setup_refresh_list"
|
||||
android:layout_width="260dip"
|
||||
android:layout_height="60dip"
|
||||
android:textSize="24dip"
|
||||
android:layout_width="208dip"
|
||||
android:layout_height="48dip"
|
||||
android:layout_marginLeft="16dip"
|
||||
android:text="@string/wifi_setup_refresh_list"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:enabled="false" />
|
||||
|
||||
<Button android:id="@+id/wifi_setup_skip_or_next"
|
||||
android:layout_width="260dip"
|
||||
android:layout_height="60dip"
|
||||
android:layout_marginTop="30dip"
|
||||
android:textSize="24dip"
|
||||
android:layout_width="208dip"
|
||||
android:layout_height="48dip"
|
||||
android:layout_marginTop="96dip"
|
||||
android:layout_marginLeft="16dip"
|
||||
android:text="@string/wifi_setup_skip"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:enabled="false" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- This misleading name is for keeping consistency between non-XL layouts -->
|
||||
<Button android:id="@+id/wifi_setup_cancel"
|
||||
android:layout_width="260dip"
|
||||
android:layout_height="60dip"
|
||||
android:layout_marginTop="20dip"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_width="208dip"
|
||||
android:layout_height="48dip"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:layout_marginBottom="16dip"
|
||||
android:layout_alignBottom="@+id/content"
|
||||
android:layout_toLeftOf="@id/right_buttons"
|
||||
android:textSize="24dip"
|
||||
android:text="@string/wifi_setup_back"
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
|
43
res/layout/custom_list_item.xml
Normal file
43
res/layout/custom_list_item.xml
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2010 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.
|
||||
-->
|
||||
|
||||
<!-- Based on simple_list_item_2.xml in framework -->
|
||||
<TwoLineListItem xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:mode="twoLine"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
|
||||
<TextView android:id="@android:id/text1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="16dip"
|
||||
android:layout_marginLeft="10dip"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
/>
|
||||
|
||||
<TextView android:id="@android:id/text2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="10dip"
|
||||
android:layout_below="@android:id/text1"
|
||||
android:layout_alignLeft="@android:id/text1"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
/>
|
||||
|
||||
</TwoLineListItem>
|
@@ -31,6 +31,7 @@
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="6dip"
|
||||
android:layout_marginRight="6dip"
|
||||
android:layout_marginTop="6dip"
|
||||
android:layout_marginBottom="6dip"
|
||||
|
39
res/layout/custom_preference_list_fragment.xml
Normal file
39
res/layout/custom_preference_list_fragment.xml
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
** Copyright 2010, 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.
|
||||
*/
|
||||
-->
|
||||
|
||||
<!-- Based on preference_list_fragment.xml in framework -->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@android:color/transparent">
|
||||
|
||||
<ListView android:id="@android:id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0px"
|
||||
android:layout_weight="1"
|
||||
android:paddingTop="0dip"
|
||||
android:paddingBottom="0dip"
|
||||
android:paddingLeft="0dip"
|
||||
android:paddingRight="0dip"
|
||||
android:clipToPadding="false"
|
||||
android:drawSelectorOnTop="false"
|
||||
android:cacheColorHint="@android:color/transparent"
|
||||
android:scrollbarAlwaysDrawVerticalTrack="true" />
|
||||
</LinearLayout>
|
@@ -108,13 +108,14 @@
|
||||
<LinearLayout android:id="@+id/eap_not_supported"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dip"
|
||||
android:layout_marginTop="32dip"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
<TextView android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="22sp"
|
||||
android:text="@string/wifi_setup_eap_not_supported" />
|
||||
android:lineSpacingExtra="12dip"
|
||||
android:text="@string/wifi_setup_eap_not_supported"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- All the views below are "gone".
|
||||
|
@@ -544,6 +544,12 @@
|
||||
<string name="zone_list_menu_sort_alphabetically">Sort alphabetically</string>
|
||||
<!-- Menu item on Select time zone screen -->
|
||||
<string name="zone_list_menu_sort_by_timezone">Sort by time zone</string>
|
||||
<!-- Title string shown above DatePicker, letting a user select system date
|
||||
[CHAR LIMIT=20] -->
|
||||
<string name="date_picker_title">Date</string>
|
||||
<!-- Title string shown above TimePicker, letting a user select system time
|
||||
[CHAR LIMIT=20] -->
|
||||
<string name="time_picker_title">Time</string>
|
||||
|
||||
<!-- Security Settings --><skip />
|
||||
|
||||
|
@@ -100,7 +100,8 @@ public class DateTimeSettingsSetupWizard extends Activity
|
||||
mTimeZoneButton.setText(tz.getDisplayName());
|
||||
// mTimeZoneButton.setText(DateTimeSettings.getTimeZoneText(tz));
|
||||
mTimeZoneButton.setOnClickListener(this);
|
||||
mTimeZoneAdapter = ZonePicker.constructTimezoneAdapter(this, false);
|
||||
mTimeZoneAdapter = ZonePicker.constructTimezoneAdapter(this, false,
|
||||
R.layout.custom_list_item);
|
||||
|
||||
final boolean autoDateTimeEnabled;
|
||||
final Intent intent = getIntent();
|
||||
@@ -110,7 +111,7 @@ public class DateTimeSettingsSetupWizard extends Activity
|
||||
autoDateTimeEnabled = isAutoDateTimeEnabled();
|
||||
}
|
||||
|
||||
mAutoDateTimeButton = (CompoundButton)findViewById(R.id.date_time_auto);
|
||||
mAutoDateTimeButton = (CompoundButton)findViewById(R.id.date_time_auto_button);
|
||||
mAutoDateTimeButton.setChecked(autoDateTimeEnabled);
|
||||
mAutoDateTimeButton.setText(autoDateTimeEnabled ? R.string.date_time_auto_summaryOn :
|
||||
R.string.date_time_auto_summaryOff);
|
||||
|
@@ -80,6 +80,17 @@ public class ZonePicker extends ListFragment {
|
||||
*/
|
||||
public static SimpleAdapter constructTimezoneAdapter(Context context,
|
||||
boolean sortedByName) {
|
||||
return constructTimezoneAdapter(context, sortedByName,
|
||||
android.R.layout.simple_list_item_2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an adapter with TimeZone list. Sorted by TimeZone in default.
|
||||
*
|
||||
* @param sortedByName use Name for sorting the list.
|
||||
*/
|
||||
public static SimpleAdapter constructTimezoneAdapter(Context context,
|
||||
boolean sortedByName, int layoutId) {
|
||||
final String[] from = new String[] {KEY_DISPLAYNAME, KEY_GMT};
|
||||
final int[] to = new int[] {android.R.id.text1, android.R.id.text2};
|
||||
|
||||
@@ -89,7 +100,7 @@ public class ZonePicker extends ListFragment {
|
||||
Collections.sort(sortedList, comparator);
|
||||
final SimpleAdapter adapter = new SimpleAdapter(context,
|
||||
sortedList,
|
||||
android.R.layout.simple_list_item_2,
|
||||
layoutId,
|
||||
from,
|
||||
to);
|
||||
|
||||
|
@@ -49,10 +49,12 @@ import android.security.Credentials;
|
||||
import android.security.KeyStore;
|
||||
import android.view.ContextMenu;
|
||||
import android.view.ContextMenu.ContextMenuInfo;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView.AdapterContextMenuInfo;
|
||||
import android.widget.Toast;
|
||||
|
||||
@@ -107,11 +109,6 @@ public class WifiSettings extends SettingsPreferenceFragment
|
||||
// this boolean extra specifies whether to disable the Next button when not connected
|
||||
private static final String EXTRA_ENABLE_NEXT_ON_CONNECT = "wifi_enable_next_on_connect";
|
||||
|
||||
// Indicates that this fragment is used as a part of Setup Wizard with XL screen settings.
|
||||
// This fragment should show information which has been shown as Dialog in combined UI
|
||||
// inside this fragment.
|
||||
/* package */ static final String IN_XL_SETUP_WIZARD = "in_setup_wizard";
|
||||
|
||||
// should Next button only be enabled when we have a connection?
|
||||
private boolean mEnableNextOnConnection;
|
||||
private boolean mInXlSetupWizard;
|
||||
@@ -139,6 +136,23 @@ public class WifiSettings extends SettingsPreferenceFragment
|
||||
mScanner = new Scanner();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(Activity activity) {
|
||||
super.onAttach(activity);
|
||||
|
||||
mInXlSetupWizard = (activity instanceof WifiSettingsForSetupWizardXL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
if (mInXlSetupWizard) {
|
||||
return inflater.inflate(R.layout.custom_preference_list_fragment, container, false);
|
||||
} else {
|
||||
return super.onCreateView(inflater, container, savedInstanceState);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
// We don't call super.onActivityCreated() here, since it assumes we already set up
|
||||
@@ -150,11 +164,9 @@ public class WifiSettings extends SettingsPreferenceFragment
|
||||
final Activity activity = getActivity();
|
||||
final Intent intent = activity.getIntent();
|
||||
|
||||
|
||||
// if we're supposed to enable/disable the Next button based on our current connection
|
||||
// state, start it off in the right state
|
||||
mEnableNextOnConnection = intent.getBooleanExtra(EXTRA_ENABLE_NEXT_ON_CONNECT, false);
|
||||
mInXlSetupWizard = intent.getBooleanExtra(IN_XL_SETUP_WIZARD, false);
|
||||
|
||||
if (mEnableNextOnConnection) {
|
||||
if (mEnableNextOnConnection && hasNextButton()) {
|
||||
|
@@ -121,8 +121,6 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
|
||||
(WifiSettings)getFragmentManager().findFragmentById(R.id.wifi_setup_fragment);
|
||||
mInputMethodManager = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
setup();
|
||||
// XXX: should we use method?
|
||||
getIntent().putExtra(WifiSettings.IN_XL_SETUP_WIZARD, true);
|
||||
}
|
||||
|
||||
public void setup() {
|
||||
@@ -243,6 +241,7 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
|
||||
mProgressBar.setIndeterminate(false);
|
||||
mProgressBar.setProgress(2);
|
||||
mProgressText.setText(Summary.get(this, state));
|
||||
mStatusText.setVisibility(View.VISIBLE);
|
||||
mStatusText.setText(R.string.wifi_setup_status_proceed_to_next);
|
||||
|
||||
mAddNetworkButton.setVisibility(View.GONE);
|
||||
@@ -275,6 +274,7 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
|
||||
private void showConnectingStatus() {
|
||||
mProgressBar.setIndeterminate(false);
|
||||
mProgressBar.setProgress(1);
|
||||
mStatusText.setVisibility(View.VISIBLE);
|
||||
mStatusText.setText(R.string.wifi_setup_status_connecting);
|
||||
mProgressText.setText(Summary.get(this, DetailedState.CONNECTING));
|
||||
}
|
||||
@@ -284,6 +284,7 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
|
||||
((Button)findViewById(R.id.wifi_setup_add_network)).setEnabled(false);
|
||||
((Button)findViewById(R.id.wifi_setup_refresh_list)).setEnabled(false);
|
||||
mProgressText.setText(Summary.get(this, DetailedState.SCANNING));
|
||||
mStatusText.setVisibility(View.VISIBLE);
|
||||
mStatusText.setText(R.string.wifi_setup_status_scanning);
|
||||
}
|
||||
|
||||
@@ -327,14 +328,15 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
|
||||
} else if (selectedAccessPoint != null &&
|
||||
selectedAccessPoint.security == AccessPoint.SECURITY_EAP) {
|
||||
mStatusText.setText(R.string.wifi_setup_status_eap_not_supported);
|
||||
mConnectButton.setVisibility(View.GONE);
|
||||
} else {
|
||||
mStatusText.setText(R.string.wifi_setup_status_edit_network);
|
||||
// mStatusText.setText(R.string.wifi_setup_status_edit_network);
|
||||
mStatusText.setVisibility(View.GONE);
|
||||
mConnectButton.setVisibility(View.VISIBLE);
|
||||
}
|
||||
mAddNetworkButton.setVisibility(View.GONE);
|
||||
mRefreshButton.setVisibility(View.GONE);
|
||||
mSkipOrNextButton.setVisibility(View.GONE);
|
||||
mConnectButton.setVisibility(View.VISIBLE);
|
||||
mConnectButton.setVisibility(View.VISIBLE);
|
||||
mBackButton.setVisibility(View.VISIBLE);
|
||||
// TODO: remove this after UI fix.
|
||||
// mDetailButton.setVisibility(View.VISIBLE);
|
||||
@@ -400,6 +402,7 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
|
||||
} else { // During user's Wifi configuration.
|
||||
mWifiSettings.resumeWifiScan();
|
||||
|
||||
mStatusText.setVisibility(View.VISIBLE);
|
||||
mStatusText.setText(R.string.wifi_setup_status_select_network);
|
||||
restoreFirstButtonVisibilityState();
|
||||
|
||||
|
Reference in New Issue
Block a user