OSDN Git Service

Update the Bluetooth pin pairing view to the new spec.
authorDaniel Nishi <dhnishi@google.com>
Tue, 19 Jul 2016 19:41:46 +0000 (12:41 -0700)
committerDaniel Nishi <dhnishi@google.com>
Wed, 20 Jul 2016 21:17:42 +0000 (14:17 -0700)
Bug: 30191613
Change-Id: Ib7b5f1758be0af33f6ea60d581a27df4801fc835

res/layout/bluetooth_pin_entry.xml
res/values/dimens.xml

index aa9f187..c309a24 100644 (file)
         android:layout_width="match_parent"
         android:orientation="vertical">
 
-        <TextView
-            android:id="@+id/message_caption"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="@dimen/bluetooth_dialog_padding"
-            android:layout_marginEnd="@dimen/bluetooth_dialog_padding"
-            android:layout_marginTop="@dimen/bluetooth_dialog_padding"
-            android:gravity="center_vertical"
-            android:textAppearance="@android:style/TextAppearance.Material.Caption" />
-
-        <TextView
-            android:id="@+id/message_subhead"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="@dimen/bluetooth_dialog_padding"
-            android:layout_marginEnd="@dimen/bluetooth_dialog_padding"
-            android:layout_marginBottom="@dimen/bluetooth_dialog_padding"
-            android:gravity="center_vertical"
-            android:textAppearance="@android:style/TextAppearance.Material.Subhead" />
-
         <EditText
             android:id="@+id/text"
             android:layout_height="wrap_content"
             android:layout_width="match_parent"
-            android:layout_marginStart="@dimen/bluetooth_dialog_padding"
-            android:layout_marginEnd="@dimen/bluetooth_dialog_padding"
+            android:layout_marginStart="@dimen/bluetooth_pairing_edittext_padding"
+            android:layout_marginEnd="@dimen/bluetooth_pairing_padding"
+            android:layout_marginTop="11dp"
+            android:minHeight="48dp"
             android:inputType="textPassword"
             android:singleLine="true" />
 
@@ -62,8 +44,9 @@
             android:text="@string/bluetooth_pin_values_hint"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginStart="@dimen/bluetooth_dialog_padding"
-            android:layout_marginEnd="@dimen/bluetooth_dialog_padding"
+            android:layout_marginStart="@dimen/bluetooth_pairing_padding"
+            android:layout_marginEnd="@dimen/bluetooth_pairing_padding"
+            android:layout_marginBottom="6dp"
             android:gravity="center_vertical"
             android:textAppearance="?android:attr/textAppearanceSmall" />
 
             android:text="@string/bluetooth_enable_alphanumeric_pin"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginStart="@dimen/bluetooth_dialog_padding"
-            android:layout_marginEnd="@dimen/bluetooth_dialog_padding"
+            android:layout_marginStart="@dimen/bluetooth_pairing_padding"
+            android:layout_marginEnd="@dimen/bluetooth_pairing_padding"
+            android:layout_marginBottom="16dp"
             android:gravity="center"
-            android:textAppearance="?android:attr/textAppearanceSmall" />
+            android:paddingStart="@dimen/bluetooth_checkbox_padding"
+            android:textAppearance="@android:style/TextAppearance.Material.Body1"
+            android:textColor="?android:attr/textColorSecondary"/>
 
         <TextView
             android:id="@+id/message_below_pin"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginStart="@dimen/bluetooth_dialog_padding"
-            android:layout_marginEnd="@dimen/bluetooth_dialog_padding"
+            android:layout_marginStart="@dimen/bluetooth_pairing_padding"
+            android:layout_marginEnd="@dimen/bluetooth_pairing_padding"
+            android:layout_marginBottom="12dp"
             android:gravity="center_vertical"
             android:textAppearance="@android:style/TextAppearance.Material.Subhead"
-            android:textColor="@*android:color/secondary_text_material_light"/>
+            android:textColor="?android:attr/textColorSecondary"/>
 
         <CheckBox
             android:id="@+id/phonebook_sharing_message_entry_pin"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginStart="@dimen/bluetooth_dialog_padding"
-            android:layout_marginEnd="@dimen/bluetooth_dialog_padding"
+            android:layout_marginStart="@dimen/bluetooth_pairing_padding"
+            android:layout_marginEnd="@dimen/bluetooth_pairing_padding"
+            android:layout_marginBottom="12dp"
             android:gravity="center_vertical"
+            android:paddingStart="@dimen/bluetooth_checkbox_padding"
             android:text="@string/bluetooth_pairing_shares_phonebook"
-            android:textAppearance="?android:attr/textAppearanceSmall" />
+            android:textAppearance="@android:style/TextAppearance.Material.Body1"
+            android:textColor="?android:attr/textColorSecondary"/>
 
     </LinearLayout>
 
index d65bdfb..2a2b406 100755 (executable)
     <!-- Bluetooth Preferences -->
     <dimen name="bluetooth_dialog_padding">8dip</dimen>
     <integer name="bluetooth_name_length">32</integer>
-    <dimen name="bluetooth_pairing_padding">20dp</dimen>
+    <dimen name="bluetooth_pairing_padding">24dp</dimen>
+    <dimen name="bluetooth_pairing_edittext_padding">21dp</dimen>
+    <dimen name="bluetooth_checkbox_padding">16dp</dimen>
 
     <!-- WiFi Preferences -->
     <dimen name="wifi_divider_height">1px</dimen>