summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorBrandon Maxwell <maxwelb@google.com>2016-04-22 21:41:04 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-04-22 21:41:04 +0000
commit5fffba0f3ba026f3a906c8ed4d0c607666687209 (patch)
treef800dd68cfed9cba79de4451a282e78f4b83c139 /res
parentfe3157c3143c19375dbcf68e6876ef8bd8191f26 (diff)
parentfd95466779e0a25c5d8de9a71ba1fc6c059ed7b8 (diff)
Merge "Adding migrate promo to blocked numbers setting ui" into nyc-dev
am: fd95466 * commit 'fd95466779e0a25c5d8de9a71ba1fc6c059ed7b8': Adding migrate promo to blocked numbers setting ui Change-Id: Iee5405b3a5497dbd1ff02922137b87d47bb098d0
Diffstat (limited to 'res')
-rw-r--r--res/drawable/selectable_primary_flat_button.xml27
-rw-r--r--res/layout/blocked_number_header.xml47
-rw-r--r--res/values/styles.xml15
3 files changed, 88 insertions, 1 deletions
diff --git a/res/drawable/selectable_primary_flat_button.xml b/res/drawable/selectable_primary_flat_button.xml
new file mode 100644
index 000000000..c6eb7a26a
--- /dev/null
+++ b/res/drawable/selectable_primary_flat_button.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright (C) 2016 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.
+ */
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false">
+ <shape><solid android:color="@color/material_grey_300" /></shape>
+ </item>
+ <item>
+ <shape><solid android:color="@color/dialer_theme_color" /></shape>
+ </item>
+</selector> \ No newline at end of file
diff --git a/res/layout/blocked_number_header.xml b/res/layout/blocked_number_header.xml
index 0af942943..e4b795fd8 100644
--- a/res/layout/blocked_number_header.xml
+++ b/res/layout/blocked_number_header.xml
@@ -61,7 +61,7 @@
android:orientation="vertical">
<TextView
- android:id="@+id/textView"
+ android:id="@+id/blocked_number_text_view"
style="@android:style/TextAppearance.Material.Subhead"
android:layout_width="wrap_content"
android:layout_height="48dp"
@@ -119,6 +119,51 @@
</RelativeLayout>
<LinearLayout
+ android:id="@+id/migrate_promo"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:visibility="gone">
+
+ <TextView
+ android:id="@+id/migrate_promo_header"
+ style="@android:style/TextAppearance.Material.Subhead"
+ android:layout_width="match_parent"
+ android:layout_height="48dp"
+ android:paddingStart="@dimen/blocked_number_container_padding"
+ android:paddingEnd="@dimen/blocked_number_container_padding"
+ android:gravity="center_vertical"
+ android:textStyle="bold"
+ android:text="@string/migrate_blocked_numbers_dialog_title"
+ android:textColor="@color/blocked_number_header_color"/>
+
+ <TextView
+ android:id="@+id/migrate_promo_description"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="@dimen/blocked_number_container_padding"
+ android:layout_marginEnd="@dimen/blocked_number_container_padding"
+ android:layout_marginBottom="@dimen/blocked_number_container_padding"
+ android:text="@string/migrate_blocked_numbers_dialog_message"
+ android:textColor="@color/secondary_text_color"/>
+
+ <Button
+ android:id="@+id/migrate_promo_allow_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/migrate_blocked_numbers_dialog_allow_button"
+ android:layout_marginStart="@dimen/blocked_number_container_padding"
+ android:layout_marginEnd="@dimen/blocked_number_container_padding"
+ android:layout_gravity="end"
+ style="@style/DialerPrimaryFlatButtonStyle"
+ android:layout_marginBottom="@dimen/blocked_number_container_padding"/>
+
+ <View
+ style="@style/FullWidthDivider"/>
+
+ </LinearLayout>
+
+ <LinearLayout
android:id="@+id/add_number_linear_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 66a45f977..6a40d09be 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -322,10 +322,25 @@
<item name="android:textColor">@color/dialer_flat_button_text_color</item>
</style>
+ <!-- Style for the 'primary' button in a view. Unlike the DialerFlatButtonStyle, this button -->
+ <!-- is not colored white, to draw more attention to it. -->
+ <style name="DialerPrimaryFlatButtonStyle" parent="@android:style/Widget.Material.Button">
+ <item name="android:background">@drawable/selectable_primary_flat_button</item>
+ <item name="android:paddingEnd">@dimen/button_horizontal_padding</item>
+ <item name="android:paddingStart">@dimen/button_horizontal_padding</item>
+ <item name="android:textColor">@android:color/white</item>
+ </style>
+
<style name="BlockedNumbersDescriptionTextStyle">
<item name="android:lineSpacingMultiplier">1.43</item>
<item name="android:paddingTop">8dp</item>
<item name="android:paddingBottom">8dp</item>
<item name="android:textSize">@dimen/blocked_number_settings_description_text_size</item>
</style>
+
+ <style name="FullWidthDivider">
+ <item name="android:layout_width">match_parent</item>
+ <item name="android:layout_height">1dp</item>
+ <item name="android:background">?android:attr/listDivider</item>
+ </style>
</resources>