diff options
author | Ta-wei Yen <twyen@google.com> | 2015-11-05 14:13:12 -0800 |
---|---|---|
committer | Ta-wei Yen <twyen@google.com> | 2015-11-06 22:54:14 +0000 |
commit | a5437e6882bde69cb795ed8d929c1024a8fef16e (patch) | |
tree | 1778d022d1c44d7dba00dd50abb726de8f05238b /res | |
parent | 6e0fd6b77759baf43cb37d407041be051b4856b5 (diff) |
Call Blocking UI/String change
+ Adjusted UI/String according to new specifications.
+ Added class VisualVoicemailEnabledChecker
+ Block number dialog display different message depending
on whether VVM is activated.
Bug:25455707
Change-Id: I09425053c91a5517e309302d421beadcc2d81cd4
Diffstat (limited to 'res')
-rw-r--r-- | res/drawable/ic_blocked_numbers_settings_add.xml | 20 | ||||
-rw-r--r-- | res/layout/blocked_number_footer.xml | 40 | ||||
-rw-r--r-- | res/layout/blocked_number_header.xml | 55 | ||||
-rw-r--r-- | res/values/colors.xml | 1 | ||||
-rw-r--r-- | res/values/strings.xml | 44 |
5 files changed, 116 insertions, 44 deletions
diff --git a/res/drawable/ic_blocked_numbers_settings_add.xml b/res/drawable/ic_blocked_numbers_settings_add.xml deleted file mode 100644 index adcf90676..000000000 --- a/res/drawable/ic_blocked_numbers_settings_add.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - 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. ---> - -<bitmap xmlns:android="http://schemas.android.com/apk/res/android" - android:src="@drawable/ic_add_24dp" - android:tint="@color/blocked_number_icon_tint" /> diff --git a/res/layout/blocked_number_footer.xml b/res/layout/blocked_number_footer.xml new file mode 100644 index 000000000..cdb3ead1b --- /dev/null +++ b/res/layout/blocked_number_footer.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. +--> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:card_view="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:focusable="false"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:layout_marginBottom="8dp" + android:padding="16dp" + android:background="@android:color/white" + android:focusable="true"> + + <TextView android:id="@+id/blocked_number_footer_textview" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textColor="@color/blocked_number_secondary_text_color" + android:textSize="@dimen/blocked_number_primary_text_size" + android:text="@string/block_number_footer_message_vvm" /> + + </LinearLayout> +</LinearLayout> diff --git a/res/layout/blocked_number_header.xml b/res/layout/blocked_number_header.xml index 50a3dc8f2..685c4efd8 100644 --- a/res/layout/blocked_number_header.xml +++ b/res/layout/blocked_number_header.xml @@ -60,7 +60,7 @@ <TextView android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/blockList" + android:text="@string/block_list" android:textColor="@color/blocked_number_header_color" android:padding="@dimen/blocked_number_container_padding" style="@android:style/TextAppearance.Material.Subhead" /> @@ -105,21 +105,48 @@ </RelativeLayout> - <TextView android:id="@+id/add_number_textview" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="?android:attr/selectableItemBackground" - android:textColor="@color/blocked_number_primary_text_color" - android:textSize="@dimen/blocked_number_primary_text_size" - android:paddingTop="24dp" - android:paddingBottom="24dp" - android:paddingEnd="@dimen/blocked_number_container_padding" - android:paddingStart="24dp" - android:drawableStart="@drawable/ic_blocked_numbers_settings_add" - android:drawablePadding="24dp" - android:text="@string/addBlockedNumber" /> + <LinearLayout + android:id="@+id/add_number_linear_layout" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingStart="@dimen/blocked_number_horizontal_margin" + android:paddingTop="@dimen/blocked_number_top_margin" + android:paddingBottom="@dimen/blocked_number_bottom_margin" + android:baselineAligned="false" + android:gravity="center_vertical" + android:orientation="horizontal" + android:focusable="true" + android:clickable="true" + android:background="?android:attr/selectableItemBackground" + android:contentDescription="@string/addBlockedNumber"> + + <ImageView + android:id="@+id/add_number_icon" + android:layout_width="@dimen/contact_photo_size" + android:layout_height="@dimen/contact_photo_size" + android:importantForAccessibility="no" /> + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical" + android:gravity="center_vertical" + android:layout_marginStart="@dimen/blocked_number_horizontal_margin"> + + <TextView android:id="@+id/add_number_textview" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textColor="@color/blocked_number_primary_text_color" + android:textSize="@dimen/blocked_number_primary_text_size" + android:includeFontPadding="false" + android:layout_marginBottom="5dp" + android:text="@string/addBlockedNumber" /> + </LinearLayout> + + </LinearLayout> <View + android:id="@+id/blocked_number_list_divider" android:layout_width="match_parent" android:layout_height="1dp" android:layout_marginStart="72dp" diff --git a/res/values/colors.xml b/res/values/colors.xml index 2ca697f2e..e927f740f 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -133,6 +133,7 @@ <color name="blocked_number_block_color">#F44336</color> <color name="blocked_number_header_color">@color/dialer_theme_color</color> <color name="blocked_number_disabled_emergency_header_color">#616161</color> + <color name="add_blocked_number_icon_color">#bdbdbd</color> <!-- Grey 700 --> <color name="call_detail_footer_text_color">#616161</color> diff --git a/res/values/strings.xml b/res/values/strings.xml index 4682b76cc..37b2a5cb4 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -59,7 +59,7 @@ <!-- Text for snackbar to undo blocking a number. [CHAR LIMIT=64] --> <string name="snackbar_number_blocked"> - <xliff:g id="number" example="(555) 555-5555">%1$s</xliff:g> added to block list</string> + <xliff:g id="number" example="(555) 555-5555">%1$s</xliff:g> blocked</string> <!-- Label for action to unblock a number [CHAR LIMIT=48]--> <string name="action_unblock_number">Unblock number</string> @@ -67,7 +67,7 @@ <!-- Text for snackbar to undo unblocking a number. [CHAR LIMIT=64] --> <string name="snackbar_number_unblocked"> <xliff:g id="number" example="(555) 555-5555">%1$s</xliff:g> - removed from block list</string> + unblocked</string> <!-- Text for undo button in snackbar for blocking/unblocking number. [CHAR LIMIT=10] --> <string name="block_number_undo">UNDO</string> @@ -519,19 +519,31 @@ [CHAR LIMIT=30] --> <string name="call_log_voicemail_title">Voicemail</string> - <!-- Confirmation dialog for blocking a number. [CHAR LIMIT=NONE] --> - <string name="blockNumberConfirmation">Add + <!-- Confirmation dialog title for blocking a number. [CHAR LIMIT=NONE] --> + <string name="block_number_confirmation_title">Add <xliff:g id="number" example="(555) 555-5555">%1$s</xliff:g> to your block list?</string> + <!-- Confirmation dialog message for blocking a number with visual voicemail active. + [CHAR LIMIT=NONE] --> + <string name="block_number_confirmation_message_vvm"> + Future calls from this number will be blocked and voicemails will be automatically deleted. + </string> + + <!-- Confirmation dialog message for blocking a number with no visual voicemail. + [CHAR LIMIT=NONE] --> + <string name="block_number_confirmation_message_no_vvm"> + Future calls from this number will be blocked. Voicemails may still reach you. + </string> + <!-- Block number alert dialog button [CHAR LIMIT=32] --> - <string name="blockNumberOk">Block number</string> + <string name="block_number_ok">BLOCK</string> <!-- Confirmation dialog for unblocking a number. [CHAR LIMIT=NONE] --> - <string name="unblockNumberConfirmation">Remove - <xliff:g id="number" example="(555) 555-5555">%1$s</xliff:g> from your block list?</string> + <string name="unblock_number_confirmation_title">Unblock + <xliff:g id="number" example="(555) 555-5555">%1$s</xliff:g></string> <!-- Unblock number alert dialog button [CHAR LIMIT=32] --> - <string name="unblockNumberOk">Unblock number</string> + <string name="unblock_number_ok">UNBLOCK</string> <!-- Accessibility text for the tab showing recent and favorite contacts who can be called. [CHAR LIMIT=40] --> @@ -830,7 +842,7 @@ <string name="call_settings_label">Calls</string> <!-- Label for the blocked numbers settings section [CHAR LIMIT=30] --> - <string name="manage_blocked_numbers_label">Blocked numbers</string> + <string name="manage_blocked_numbers_label">Call blocking</string> <!-- Label for a section describing that call blocking is temporarily disabled because an emergency call was made. [CHAR LIMIT=50] --> @@ -877,8 +889,20 @@ <!-- Button to bring up UI to add a number to the blocked call list. [CHAR LIMIT=40] --> <string name="addBlockedNumber">Add number</string> + <!-- Footer message of number blocking screen with visual voicemail active. + [CHAR LIMIT=NONE] --> + <string name="block_number_footer_message_vvm"> + Adding a number blocks all future calls and voicemails will be automatically deleted. + </string> + + <!-- Footer message of number blocking screen with no visual voicemail. + [CHAR LIMIT=NONE] --> + <string name="block_number_footer_message_no_vvm"> + Adding a number blocks all future calls. Voicemails may still reach you. + </string> + <!-- Heading for the block list in the "Spam and blocked cal)ls" settings. [CHAR LIMIT=64] --> - <string name="blockList">Block list</string> + <string name="block_list">Blocked numbers</string> <!-- Error message shown when user tries to add invalid number to the block list. [CHAR LIMIT=64] --> |