Settings UI elements for importing VM to block list.

+ Hidden for now, and no logic implemented yet.
+ Add UI elements for importing send-to-voicemail settings into
Dialer's blocked calls list.
+ Add strings for these settings.
+ Rearrange some dimens/colors/styles.

+ Add blue button style to theme as the default button.
+ Added FlatButtonStyle to make it easier to style standard
borderless buttons.

Bug: 23351616
Change-Id: I21804ed4f8498008f0e79d7b8c4f2b12a9a2f914
diff --git a/res/layout/blocked_number_header.xml b/res/layout/blocked_number_header.xml
index fed94cc..95880a7 100644
--- a/res/layout/blocked_number_header.xml
+++ b/res/layout/blocked_number_header.xml
@@ -14,27 +14,67 @@
      limitations under the License.
 -->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical" android:layout_width="match_parent"
+    android:orientation="vertical"
+    android:layout_width="match_parent"
     android:layout_height="wrap_content">
 
-    <TextView
-        android:id="@+id/textView"
+    <TextView android:id="@+id/textView"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:text="@string/blockList"
-        android:paddingStart="@dimen/blocked_number_horizontal_margin"
-        android:paddingTop="@dimen/blocked_number_top_margin"
-        android:paddingBottom="@dimen/blocked_number_bottom_margin"
-        android:textColor="@color/blocked_number_accent_color"
+        android:textColor="@color/blocked_number_header_color"
+        android:padding="@dimen/blocked_number_container_padding"
         style="@android:style/TextAppearance.Material.Subhead" />
 
-    <Button
-        android:id="@+id/add_number_button"
+    <RelativeLayout android:id="@+id/importsettings"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:visibility="gone">
+
+        <TextView android:id="@+id/import_description"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/blocked_call_settings_import_description"
+            android:textSize="@dimen/blocked_number_settings_description_text_size"
+            android:lineSpacingMultiplier="1.2"
+            android:paddingTop="8dp"
+            android:paddingBottom="8dp"
+            android:paddingStart="@dimen/blocked_number_container_padding"
+            android:paddingEnd="@dimen/blocked_number_container_padding" />
+
+        <Button android:id="@+id/import_button"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@id/import_description"
+            android:layout_alignParentEnd="true"
+            android:layout_marginEnd="@dimen/blocked_number_container_padding"
+            android:text="@string/blocked_call_settings_import_button"
+            style="@style/DialerFlatButtonStyle" />
+
+        <Button android:id="@+id/view_numbers_button"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@id/import_description"
+            android:layout_toLeftOf="@id/import_button"
+            android:text="@string/blocked_call_settings_view_numbers_button"
+            style="@style/DialerFlatButtonStyle" />
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="1dp"
+            android:layout_below="@id/import_button"
+            android:background="@color/divider_line_color"
+            android:layout_marginTop="8dp"
+            android:layout_marginBottom="8dp" />
+
+    </RelativeLayout>
+
+    <Button android:id="@+id/add_number_button"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:text="@string/blockNumber"
-        android:layout_gravity="right"
-        android:textColor="@color/blocked_number_accent_color"
-        style="?android:attr/borderlessButtonStyle" />
+        android:layout_gravity="end"
+        android:layout_marginEnd="@dimen/blocked_number_container_padding"
+        android:layout_marginTop="8dp"
+        android:text="@string/blockNumber" />
 
-</LinearLayout>
\ No newline at end of file
+</LinearLayout>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index f0765ba..55970d9 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -22,6 +22,9 @@
     <color name="dialer_red_highlight_color">#ff1744</color>
     <color name="dialer_green_highlight_color">#00c853</color>
 
+    <color name="dialer_button_text_color">#fff</color>
+    <color name="dialer_flat_button_text_color">@color/dialer_theme_color</color>
+
     <!-- Color for the setting text. -->
     <color name="setting_primary_color">@color/dialtacts_primary_text_color</color>
     <!-- Color for the setting description text. -->
@@ -105,6 +108,7 @@
     <color name="floating_action_button_touch_tint">#80ffffff</color>
 
     <color name="call_log_action_divider">#eeeeee</color>
+    <color name="divider_line_color">#c7c7c7</color>
 
     <!--  Colors for blocked numbers list -->
     <color name="blocked_number_primary_text_color">@color/dialtacts_primary_text_color</color>
@@ -113,9 +117,11 @@
     <color name="blocked_number_background">#E0E0E0</color>
     <color name="blocked_number_accent_color">#42A5F5</color>
     <color name="blocked_number_block_color">#F44336</color>
+    <color name="blocked_number_header_color">@color/dialer_theme_color</color>
 
     <!-- Colors for onboarding flow -->
     <color name="onboarding_primary_text_color">#ffffff</color>
     <color name="onboarding_default_dialer_screen_background_color">#e06055</color>
     <color name="onboarding_permissions_screen_background_color">#689f38</color>
+
 </resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 093e80f..38e4d0e 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -15,6 +15,8 @@
   ~ limitations under the License
 -->
 <resources>
+    <dimen name="button_horizontal_padding">16dp</dimen>
+
     <!--
           Drag to remove view (in dp because it is used in conjunction with a statically
           sized icon
@@ -147,6 +149,7 @@
     <dimen name="voicemail_playback_top_padding">12dp</dimen>
 
     <!-- Size of entries in blocked numbers list -->
+    <dimen name="blocked_number_container_padding">16dp</dimen>
     <dimen name="blocked_number_horizontal_margin">16dp</dimen>
     <dimen name="blocked_number_top_margin">16dp</dimen>
     <dimen name="blocked_number_bottom_margin">16dp</dimen>
@@ -154,6 +157,7 @@
     <dimen name="blocked_number_secondary_text_size">12sp</dimen>
     <dimen name="blocked_number_delete_icon_size">32dp</dimen>
     <dimen name="blocked_number_search_text_size">14sp</dimen>
+    <dimen name="blocked_number_settings_description_text_size">16sp</dimen>
 
     <dimen name="call_type_icon_size">12dp</dimen>
 </resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index b2621cd..4db1213 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -833,6 +833,21 @@
     <!-- Label for the blocked calls settings section [CHAR LIMIT=30] -->
     <string name="blocked_calls_settings_label">Spam and blocked calls</string>
 
+    <!-- Text informing the user they have previously marked contacts to be sent to voicemail.
+         This will be followed by two buttons, 1) to view who is marked to be sent to voicemail
+         and 2) importing these settings to Dialer's block list. [CHAR LIMIT=NONE] -->
+    <string name="blocked_call_settings_import_description">
+        You previously marked some callers to be automatically sent to voicemail via other apps.
+    </string>
+
+    <!-- Labe for button to view numbers of contacts previous marked to be sent to voicemail.
+         [CHAR_LIMIT=20] -->
+    <string name="blocked_call_settings_view_numbers_button">View Numbers</string>
+
+    <!-- Label for button to import settings for sending contacts to voicemail into Dialer's block
+         list. [CHAR_LIMIT=20] -->
+    <string name="blocked_call_settings_import_button">Import</string>
+
     <!-- String describing the delete icon on a blocked number list item.
         When tapped, it will show a dialog confirming the unblocking of the number.
         [CHAR LIMIT=NONE]-->
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 86c3ad4..005fd45 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -83,6 +83,12 @@
         <item name="android:colorPrimaryDark">@color/dialer_theme_color_dark</item>
         <item name="dialpad_key_button_touch_tint">@color/dialer_dialpad_touch_tint</item>
         <item name="android:colorControlActivated">@color/dialer_theme_color</item>
+        <item name="android:colorButtonNormal">@color/dialer_theme_color</item>
+        <item name="android:textAppearanceButton">@style/DialerButtonTextStyle</item>
+    </style>
+
+    <style name="DialerButtonTextStyle" parent="@android:style/TextAppearance.Material.Widget.Button">
+        <item name="android:textColor">#fff</item>
     </style>
 
     <!-- Action bar overflow menu icon. -->
@@ -278,4 +284,11 @@
         <item name="android:background">@drawable/oval_ripple</item>
         <item name="android:padding">8dp</item>
     </style>
+
+    <style name="DialerFlatButtonStyle" parent="@android:style/Widget.Material.Button">
+        <item name="android:background">?android:attr/selectableItemBackground</item>
+        <item name="android:paddingEnd">@dimen/button_horizontal_padding</item>
+        <item name="android:paddingStart">@dimen/button_horizontal_padding</item>
+        <item name="android:textColor">@color/dialer_flat_button_text_color</item>
+    </style>
 </resources>