OSDN Git Service

[WifiSetup] Add + icon to Add another network
authorMaurice Lam <yukl@google.com>
Wed, 20 May 2015 22:16:47 +0000 (15:16 -0700)
committerMaurice Lam <yukl@google.com>
Sat, 30 May 2015 03:34:03 +0000 (20:34 -0700)
Add the + icon to "Add another network" in Wi-Fi screen in setup
wizard, and make the text black and sentence case.

Bug: 21089864
Change-Id: Iccfc5fc4ff5e50a599f3004a20e5cfa24a13043a

res/drawable/setup_ic_add_another_network.xml [new file with mode: 0644]
res/layout/setup_wifi_add_network.xml
res/values/dimens.xml
res/values/styles.xml

diff --git a/res/drawable/setup_ic_add_another_network.xml b/res/drawable/setup_ic_add_another_network.xml
new file mode 100644 (file)
index 0000000..fd716d1
--- /dev/null
@@ -0,0 +1,30 @@
+<!--
+    Copyright (C) 2015 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="25.0dp"
+        android:height="32.0dp"
+        android:viewportWidth="38.0"
+        android:viewportHeight="48.0">
+
+    <group android:translateX="5.0" android:translateY="10.0">
+
+        <path
+            android:fillColor="?android:attr/colorControlNormal"
+            android:pathData="M28.0,16.0L16.0,16.0l0.0,12.0l-4.0,0.0L12.0,16.0L0.0,16.0l0.0,-4.0l12.0,0.0L12.0,0.0l4.0,0.0l0.0,12.0l12.0,0.0l0.0,4.0z"/>
+
+    </group>
+
+</vector>
index c62f983..23577c5 100644 (file)
     android:layout_width="match_parent"
     android:layout_height="@dimen/setup_add_network_item_height"
     android:background="?android:attr/selectableItemBackground"
+    android:gravity="center_vertical"
     android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
-    android:paddingStart="?android:attr/listPreferredItemPaddingStart" >
+    android:paddingStart="?android:attr/listPreferredItemPaddingStart">
+
+    <LinearLayout
+        android:layout_width="@dimen/setup_preference_icon_frame_width"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="@dimen/setup_preference_icon_frame_margin_start"
+        android:gravity="start|center_vertical"
+        android:paddingEnd="@dimen/setup_preference_icon_frame_padding_end">
+
+        <ImageView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:src="@drawable/setup_ic_add_another_network" />
+
+    </LinearLayout>
 
     <TextView
-        style="@style/SetupAddWifiNetwork"
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:text="@string/wifi_other_network" />
+        android:layout_height="wrap_content"
+        android:text="@string/wifi_other_network"
+        android:textAppearance="@style/TextAppearance.SetupWizardDescription" />
 
 </LinearLayout>
index 646c385..d2eb0ab 100755 (executable)
 
     <dimen name="crypt_clock_size">100sp</dimen>
 
+    <dimen name="setup_add_network_item_height">56dp</dimen>
     <!-- Size of padding to give in the wifi list when there is no icon -->
     <dimen name="setup_list_no_icon_padding">56dp</dimen>
-    <dimen name="setup_add_network_item_height">56dp</dimen>
+    <dimen name="setup_preference_icon_frame_margin_start">-4dp</dimen>
+    <dimen name="setup_preference_icon_frame_padding_end">12dp</dimen>
+    <dimen name="setup_preference_icon_frame_width">60dp</dimen>
     <dimen name="setup_wizard_margin_top">24dp</dimen>
 
     <dimen name="divider_height">3dip</dimen>
index cca8a70..5e9d870 100644 (file)
     <style name="TextAppearance.SetupWizardDescription" parent="@android:style/TextAppearance.Material.Subhead">
     </style>
 
-    <style name="SetupAddWifiNetwork">
-        <item name="android:fontFamily">sans-serif-medium</item>
-        <item name="android:gravity">start|center_vertical</item>
-        <item name="android:paddingStart">@dimen/setup_list_no_icon_padding</item>
-        <item name="android:textAllCaps">true</item>
-        <item name="android:textAppearance">@android:style/TextAppearance.Small</item>
-        <item name="android:textColor">?android:attr/colorAccent</item>
-    </style>
-
     <style name="TrimmedHorizontalProgressBar" parent="android:Widget.Material.ProgressBar.Horizontal">
         <item name="android:indeterminateDrawable">@drawable/progress_indeterminate_horizontal_material_trimmed</item>
         <item name="android:minHeight">3dip</item>