Add Wifi Setup screen for Setup Wizard with XL size screen.

* Add WifiSettingsForSetupWizardXL as a new Activity
The activity has WifiSettings fragment in it. It also contains
several buttons, texts around the fragment.

* Making configuration UI part of Preference list.
In Wifi Setup for Setup Wizard XL, WifiSettings fragment lets
a UI for configuring access points shown inside a
PregerenceCategory object, while it has been shown as Dialog.

To achieve this action, WifiDialog is decomposed into two parts:
- WifiConfigUiBase (Mainly UI part)
- WifiConfigController (Mainly Wifi controller part)

All codes for wifi configuration in WifiDialog is now in
WifiConfigController, which is reused from
WifiConfigPreference.

* Misc stuff
- Remove AccessPoint#compareTo(). Instead,
  AccessPoint.AccessPointComparater should be used when needed.

Change-Id: I520d690d3301837d32f91dad54a973a379ce1989
This commit is contained in:
Daisuke Miyakawa
2010-08-27 10:04:08 -07:00
parent 0b4dc9fd6f
commit d36699282c
18 changed files with 1537 additions and 426 deletions

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2006 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:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingRight="?android:attr/scrollbarSize">
<LinearLayout android:id="@+android:id/widget_frame"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:orientation="vertical" />
</LinearLayout>

View File

@@ -0,0 +1,149 @@
<?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.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingTop="70dip"
android:paddingBottom="80dip"
android:paddingLeft="60dip"
android:paddingRight="60dip">
<!-- Left: almost empty with one title at the top -->
<RelativeLayout
android:orientation="vertical"
android:layout_width="0px"
android:layout_weight=".3"
android:layout_height="fill_parent"
android:paddingRight="10dip"
android:paddingBottom="10dip">
<TextView
android:id="@+id/wifi_setup_title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center|top"
android:textSize="48dip"
android:textColor="#FF30FF30"
android:text="@string/wifi_setup_title"/>
<Button
android:id="@+id/wifi_setup_cancel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:textSize="24dip"
android:text="@string/wifi_cancel"
android:visibility="gone" />
</RelativeLayout>
<!-- Center: Full of fragment -->
<LinearLayout
android:orientation="vertical"
android:layout_width="0px"
android:layout_weight=".4"
android:layout_height="fill_parent"
android:paddingTop="20dip"
android:paddingLeft="10dip"
android:paddingRight="30dip"
android:paddingBottom="15dip">
<!-- Assume the text size of this text should be same as Preference's
texts. See also preference.xml -->
<TextView
android:id="@+id/wifi_setup_status"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#ff113344"
android:paddingLeft="5dip"
android:paddingTop="5dip"
android:paddingBottom="5dip"
android:layout_marginBottom="20dip"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="@string/wifi_setup_status_select_network"/>
<fragment
class="com.android.settings.wifi.WifiSettings"
android:id="@+id/wifi_setup_fragment"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<!-- Right: various information -->
<RelativeLayout
android:orientation="vertical"
android:layout_width="0px"
android:layout_weight=".3"
android:layout_height="fill_parent"
android:paddingTop="22dip"
android:paddingLeft="30dip"
android:paddingBottom="10dip">
<TextView
android:id="@+id/scanning_progress_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:textSize="24dip"
android:text="@string/progress_scanning"/>
<ProgressBar
android:id="@+id/scanning_progress_bar"
android:layout_width="100dip"
android:layout_height="wrap_content"
android:layout_below="@id/scanning_progress_text"
style="?android:attr/progressBarStyleHorizontal" />
<Button
android:id="@+id/wifi_setup_connect"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:textSize="24dip"
android:text="@string/wifi_connect"
android:visibility="gone" />
<Button
android:id="@+id/wifi_setup_forget"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:textSize="24dip"
android:text="@string/wifi_forget"
android:visibility="gone" />
<Button
android:id="@+id/wifi_setup_skip_or_next"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dip"
android:layout_alignParentBottom="true"
android:textSize="24dip"
android:text="@string/wifi_setup_skip" />
<Button
android:id="@+id/wifi_setup_refresh_list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@id/wifi_setup_skip_or_next"
android:textSize="24dip"
android:text="@string/wifi_setup_refresh_list" />
<Button
android:id="@+id/wifi_setup_add_network"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@id/wifi_setup_refresh_list"
android:textSize="24dip"
android:text="@string/wifi_setup_add_network" />
</RelativeLayout>
</LinearLayout>