summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-10-20 17:41:11 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-10-20 17:41:11 +0000
commit82f65c1b2d6aa6a8e6b84cf8ce54b12b4149eecd (patch)
treeb29ff0f547b14f58f198df50892ff2f52ec4ddab
parentef7070f1454d88ca05987870ba639256b19f3b08 (diff)
parenta6732f7dd28e56fcc075f6d405ff2dada0a83cea (diff)
Merge "Show unblock icon for blocked numbers." into ub-contactsdialer-a-dev
-rw-r--r--res/drawable-hdpi/ic_unblock.pngbin0 -> 1049 bytes
-rw-r--r--res/drawable-mdpi/ic_unblock.pngbin0 -> 746 bytes
-rw-r--r--res/drawable-xhdpi/ic_unblock.pngbin0 -> 1356 bytes
-rw-r--r--res/drawable-xxhdpi/ic_unblock.pngbin0 -> 1990 bytes
-rw-r--r--res/drawable-xxxhdpi/ic_unblock.pngbin0 -> 1389 bytes
-rw-r--r--res/drawable/ic_call_detail_unblock.xml20
-rw-r--r--res/layout/call_detail_footer.xml8
-rw-r--r--src/com/android/dialer/CallDetailActivity.java4
8 files changed, 28 insertions, 4 deletions
diff --git a/res/drawable-hdpi/ic_unblock.png b/res/drawable-hdpi/ic_unblock.png
new file mode 100644
index 000000000..03643b20d
--- /dev/null
+++ b/res/drawable-hdpi/ic_unblock.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_unblock.png b/res/drawable-mdpi/ic_unblock.png
new file mode 100644
index 000000000..d80fb2f5c
--- /dev/null
+++ b/res/drawable-mdpi/ic_unblock.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_unblock.png b/res/drawable-xhdpi/ic_unblock.png
new file mode 100644
index 000000000..f7dfa21ac
--- /dev/null
+++ b/res/drawable-xhdpi/ic_unblock.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_unblock.png b/res/drawable-xxhdpi/ic_unblock.png
new file mode 100644
index 000000000..828a4879f
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_unblock.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_unblock.png b/res/drawable-xxxhdpi/ic_unblock.png
new file mode 100644
index 000000000..99a1842a2
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_unblock.png
Binary files differ
diff --git a/res/drawable/ic_call_detail_unblock.xml b/res/drawable/ic_call_detail_unblock.xml
new file mode 100644
index 000000000..ba5378b10
--- /dev/null
+++ b/res/drawable/ic_call_detail_unblock.xml
@@ -0,0 +1,20 @@
+<?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_unblock"
+ android:tint="@color/call_detail_footer_icon_tint" />
diff --git a/res/layout/call_detail_footer.xml b/res/layout/call_detail_footer.xml
index 048f8031b..6ee76e62e 100644
--- a/res/layout/call_detail_footer.xml
+++ b/res/layout/call_detail_footer.xml
@@ -27,21 +27,21 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/action_block_number"
- android:drawableLeft="@drawable/ic_call_detail_block"
+ android:drawableStart="@drawable/ic_call_detail_block"
style="@style/CallDetailActionItemStyle" />
<TextView android:id="@+id/call_detail_action_copy"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/action_copy_number_text"
- android:drawableLeft="@drawable/ic_call_detail_content_copy"
+ android:drawableStart="@drawable/ic_call_detail_content_copy"
style="@style/CallDetailActionItemStyle" />
<TextView android:id="@+id/call_detail_action_edit_before_call"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/action_edit_number_before_call"
- android:drawableLeft="@drawable/ic_call_detail_edit"
+ android:drawableStart="@drawable/ic_call_detail_edit"
android:visibility="gone"
style="@style/CallDetailActionItemStyle" />
@@ -49,7 +49,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/action_report_number"
- android:drawableLeft="@drawable/ic_call_detail_report"
+ android:drawableStart="@drawable/ic_call_detail_report"
android:visibility="gone"
style="@style/CallDetailActionItemStyle" />
diff --git a/src/com/android/dialer/CallDetailActivity.java b/src/com/android/dialer/CallDetailActivity.java
index ef219800f..284a5785e 100644
--- a/src/com/android/dialer/CallDetailActivity.java
+++ b/src/com/android/dialer/CallDetailActivity.java
@@ -455,8 +455,12 @@ public class CallDetailActivity extends AppCompatActivity
private void updateBlockActionItem() {
if (mBlockedNumberId == null) {
mBlockNumberActionItem.setText(R.string.action_block_number);
+ mBlockNumberActionItem.setCompoundDrawablesWithIntrinsicBounds(
+ R.drawable.ic_call_detail_block, 0, 0, 0);
} else {
mBlockNumberActionItem.setText(R.string.action_unblock_number);
+ mBlockNumberActionItem.setCompoundDrawablesWithIntrinsicBounds(
+ R.drawable.ic_call_detail_unblock, 0, 0, 0);
}
mBlockNumberActionItem.setVisibility(View.VISIBLE);