Enlarge texts and fit the other elements

Basically set text size to 18sp and change layouts
along with the new design.

- Add custom list item xml for Wi-Fi security field
  rename existing "custom_list_item.xml" to appropriate
  name so that we won't be confused with their naming.
- Use the custom xml just in SetupWizard.

Bug: 3364731
Change-Id: I014903277a03c359ea193dd0f0a37c84ade19fa1
This commit is contained in:
Daisuke Miyakawa
2011-01-26 18:37:10 -08:00
parent a71551418c
commit 7893447987
8 changed files with 137 additions and 53 deletions

View File

@@ -32,7 +32,7 @@
android:layout_alignParentLeft="true"
android:layout_marginLeft="16dip"
android:layout_alignParentTop="true"
android:textSize="30dip"
android:textSize="32dip"
android:textColor="#FF99cc00"
android:text="@string/date_and_time_settings_title_setup_wizard"
android:gravity="bottom" />
@@ -62,7 +62,8 @@
android:layout_alignParentLeft="true"
android:layout_alignBottom="@+id/date_time_auto"
android:gravity="left|center_vertical"
android:textAppearance="?android:attr/textAppearanceMedium" />
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="20dip" />
<LinearLayout
android:id="@+id/date_time_auto"
@@ -80,7 +81,8 @@
android:minHeight="?android:attr/listPreferredItemHeight"
android:layout_marginLeft="16dip"
android:text="@string/date_time_auto"
android:textAppearance="?android:attr/textAppearanceMedium" />
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="20dip" />
<!-- Divider -->
<View
@@ -108,6 +110,7 @@
android:layout_height="48dip"
android:text="@string/date_picker_title"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="20dip"
android:clickable="false"
android:longClickable="false"
android:gravity="center" />
@@ -135,6 +138,7 @@
android:layout_height="48dip"
android:text="@string/time_picker_title"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="20dip"
android:gravity="center" />
<TimePicker

View File

@@ -45,7 +45,7 @@
android:layout_centerVertical="true"
android:layout_marginLeft="16dip"
android:layout_below="@id/top_padding_layout"
android:textSize="30dip"
android:textSize="32dip"
android:textColor="#ff99cc00"
android:text="@string/wifi_setup_title"
android:gravity="bottom"/>
@@ -104,9 +104,10 @@
android:id="@+id/connecting_status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:lineSpacingExtra="12dip"
android:lineSpacingExtra="10dip"
android:inputType="textMultiLine"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="20sp"
android:clickable="false"
android:longClickable="false" />
</LinearLayout>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 The Android Open Source Project
<!-- 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.

View File

@@ -30,6 +30,7 @@
android:layout_height="wrap_content"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="20sp"
android:ellipsize="marquee"
android:fadingEdge="horizontal" />
@@ -52,73 +53,115 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/wifi_wps_pin" />
android:text="@string/wifi_wps_pin"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="20sp" />
<EditText android:id="@+id/wps_pin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:inputType="textPassword" />
android:inputType="textPassword"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="20sp" />
</LinearLayout>
<LinearLayout android:id="@+id/security_fields"
<RelativeLayout android:id="@+id/security_fields"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
<LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView android:layout_width="wrap_content"
<TextView android:id="@+id/password_text"
android:layout_width="wrap_content"
android:minWidth="80dip"
android:layout_height="wrap_content"
android:text="@string/wifi_password" />
android:minHeight="48dip"
android:layout_marginRight="8dip"
android:layout_alignParentLeft="true"
android:text="@string/wifi_password"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="20sp"
android:gravity="bottom" />
<FrameLayout android:id="@+id/password_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minHeight="48dip"
android:layout_alignParentTop="true"
android:layout_toRightOf="@id/password_text"
android:layout_alignBottom="@id/password_text">
<EditText android:id="@+id/password"
android:layout_width="320dip"
android:layout_width="368dip"
android:layout_height="wrap_content"
android:singleLine="true"
android:password="true" />
</LinearLayout>
android:password="true"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="20sp" />
</FrameLayout>
<CheckBox android:id="@+id/show_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/wifi_show_password" />
</LinearLayout>
<LinearLayout android:id="@+id/type"
android:layout_marginTop="16dip"
android:layout_below="@id/password_layout"
android:layout_alignLeft="@id/password_layout"
android:text="@string/wifi_show_password"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="20sp" />
</RelativeLayout>
<RelativeLayout android:id="@+id/type"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
<LinearLayout android:layout_width="match_parent"
<TextView android:id="@+id/ssid_text"
android:layout_width="wrap_content"
android:minWidth="128dip"
android:layout_height="wrap_content"
android:minHeight="48dip"
android:orientation="horizontal">
<TextView android:layout_width="wrap_content"
android:minWidth="112dip"
android:layout_alignParentLeft="true"
android:text="@string/wifi_ssid"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="20sp"
android:gravity="bottom"/>
<FrameLayout android:id="@+id/ssid_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/wifi_ssid" />
android:layout_alignBottom="@id/ssid_text"
android:layout_toRightOf="@id/ssid_text">
<EditText android:id="@+id/ssid"
android:layout_width="398dip"
android:layout_width="368dip"
android:layout_height="wrap_content"
android:singleLine="true"
android:inputType="textNoSuggestions" />
</LinearLayout>
android:inputType="textNoSuggestions"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="20sp" />
</FrameLayout>
<LinearLayout android:layout_width="match_parent"
<TextView android:id="@+id/security_text"
android:layout_width="wrap_content"
android:minWidth="128dip"
android:layout_height="wrap_content"
android:layout_marginTop="16dip"
android:minHeight="48dip"
android:layout_below="@id/ssid_text"
android:layout_alignLeft="@id/ssid_text"
android:text="@string/wifi_security"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="20sp"
android:gravity="bottom"/>
<Spinner android:id="@+id/security"
android:layout_width="368dip"
android:layout_height="wrap_content"
android:minHeight="48dip"
android:orientation="horizontal">
<TextView android:layout_width="wrap_content"
android:minWidth="112dip"
android:layout_height="wrap_content"
android:text="@string/wifi_security" />
<Spinner android:id="@+id/security"
android:layout_width="398dip"
android:layout_height="wrap_content"
android:prompt="@string/wifi_security"
android:entries="@array/wifi_security" />
</LinearLayout>
</LinearLayout> <!-- android:id="@+id/type" -->
android:layout_alignBottom="@id/security_text"
android:layout_toRightOf="@id/security_text"
android:paddingLeft="4dip"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="20sp"
android:gravity="left|center_vertical"/>
</RelativeLayout> <!-- android:id="@+id/type" -->
<LinearLayout android:id="@+id/eap_not_supported"
android:layout_width="match_parent"
@@ -130,7 +173,8 @@
android:layout_height="wrap_content"
android:lineSpacingExtra="12dip"
android:text="@string/wifi_setup_eap_not_supported"
android:textAppearance="?android:attr/textAppearanceMedium" />
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="20sp" />
</LinearLayout>
<!-- All the views below are "gone".

View File

@@ -0,0 +1,27 @@
<?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.
-->
<!-- Based on simple_list_item_1.xml in framework -->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="20sp"
android:gravity="center_vertical"
android:paddingLeft="10dip"
android:minHeight="48dip"
/>

View File

@@ -55,6 +55,7 @@
<item name="android:minWidth">208dip</item>
<item name="android:layout_height">48dip</item>
<item name="android:textAppearance">?android:attr/textAppearanceMedium</item>
<item name="android:textSize">20sp</item>
</style>
</resources>

View File

@@ -101,7 +101,7 @@ public class DateTimeSettingsSetupWizard extends Activity
// mTimeZoneButton.setText(DateTimeSettings.getTimeZoneText(tz));
mTimeZoneButton.setOnClickListener(this);
mTimeZoneAdapter = ZonePicker.constructTimezoneAdapter(this, false,
R.layout.custom_list_item);
R.layout.date_time_setup_custom_list_item_2);
final boolean autoDateTimeEnabled;
final Intent intent = getIntent();

View File

@@ -159,6 +159,13 @@ public class WifiConfigController implements TextWatcher,
mSsidView.addTextChangedListener(this);
mSecuritySpinner = ((Spinner) mView.findViewById(R.id.security));
mSecuritySpinner.setOnItemSelectedListener(this);
if (context instanceof WifiSettingsForSetupWizardXL) {
// We want custom layout. The content must be same as the other cases.
mSecuritySpinner.setAdapter(
new ArrayAdapter<String>(context, R.layout.wifi_setup_custom_list_item_1,
android.R.id.text1,
context.getResources().getStringArray(R.array.wifi_security)));
}
mConfigUi.setSubmitButton(context.getString(R.string.wifi_save));
} else {
mConfigUi.setTitle(mAccessPoint.ssid);