summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwangqi <wangqi@google.com>2018-03-26 15:21:32 -0700
committerCopybara-Service <copybara-piper@google.com>2018-03-26 22:27:11 -0700
commitaef646dee7f4363f38166e9306075f759052c5df (patch)
tree6ddb3b1d8f91ab41c8a76d65e1d250bbb380d899
parent135b11234146f4e44d2597c679c326c42af6e1f6 (diff)
Replace png icon with vector drawable for voice call screen.
Icons in video call screen will be replaced in following change. Bug: 76221932 Test: manual PiperOrigin-RevId: 190534558 Change-Id: Ia8abb468c71ffa4f6322043bc3bbbbe475b20a1f
-rw-r--r--assets/quantum/res/drawable-hdpi/quantum_ic_call_merge_white_36.pngbin258 -> 0 bytes
-rw-r--r--assets/quantum/res/drawable-hdpi/quantum_ic_dialpad_white_36.pngbin549 -> 0 bytes
-rw-r--r--assets/quantum/res/drawable-hdpi/quantum_ic_group_white_36.pngbin341 -> 0 bytes
-rw-r--r--assets/quantum/res/drawable-hdpi/quantum_ic_pause_white_36.pngbin124 -> 0 bytes
-rw-r--r--assets/quantum/res/drawable-hdpi/quantum_ic_videocam_white_36.pngbin222 -> 0 bytes
-rw-r--r--assets/quantum/res/drawable-mdpi/quantum_ic_call_merge_white_36.pngbin208 -> 0 bytes
-rw-r--r--assets/quantum/res/drawable-mdpi/quantum_ic_dialpad_white_36.pngbin264 -> 0 bytes
-rw-r--r--assets/quantum/res/drawable-mdpi/quantum_ic_group_white_36.pngbin236 -> 0 bytes
-rw-r--r--assets/quantum/res/drawable-mdpi/quantum_ic_pause_white_36.pngbin105 -> 0 bytes
-rw-r--r--assets/quantum/res/drawable-mdpi/quantum_ic_videocam_white_36.pngbin173 -> 0 bytes
-rw-r--r--assets/quantum/res/drawable-xhdpi/quantum_ic_call_merge_white_36.pngbin287 -> 0 bytes
-rw-r--r--assets/quantum/res/drawable-xhdpi/quantum_ic_dialpad_white_36.pngbin362 -> 0 bytes
-rw-r--r--assets/quantum/res/drawable-xhdpi/quantum_ic_group_white_36.pngbin417 -> 0 bytes
-rw-r--r--assets/quantum/res/drawable-xhdpi/quantum_ic_pause_white_36.pngbin92 -> 0 bytes
-rw-r--r--assets/quantum/res/drawable-xhdpi/quantum_ic_videocam_white_36.pngbin234 -> 0 bytes
-rw-r--r--assets/quantum/res/drawable-xxhdpi/quantum_ic_call_merge_white_36.pngbin388 -> 0 bytes
-rw-r--r--assets/quantum/res/drawable-xxhdpi/quantum_ic_dialpad_white_36.pngbin452 -> 0 bytes
-rw-r--r--assets/quantum/res/drawable-xxhdpi/quantum_ic_group_white_36.pngbin581 -> 0 bytes
-rw-r--r--assets/quantum/res/drawable-xxhdpi/quantum_ic_pause_white_36.pngbin158 -> 0 bytes
-rw-r--r--assets/quantum/res/drawable-xxhdpi/quantum_ic_videocam_white_36.pngbin350 -> 0 bytes
-rw-r--r--assets/quantum/res/drawable-xxxhdpi/quantum_ic_call_merge_white_36.pngbin435 -> 0 bytes
-rw-r--r--assets/quantum/res/drawable-xxxhdpi/quantum_ic_dialpad_white_36.pngbin754 -> 0 bytes
-rw-r--r--assets/quantum/res/drawable-xxxhdpi/quantum_ic_group_white_36.pngbin809 -> 0 bytes
-rw-r--r--assets/quantum/res/drawable-xxxhdpi/quantum_ic_pause_white_36.pngbin110 -> 0 bytes
-rw-r--r--assets/quantum/res/drawable-xxxhdpi/quantum_ic_videocam_white_36.pngbin437 -> 0 bytes
-rw-r--r--assets/quantum/res/drawable/quantum_ic_call_merge_vd_theme_24.xml25
-rw-r--r--java/com/android/incallui/incall/impl/ButtonController.java18
-rw-r--r--java/com/android/incallui/incall/impl/CheckableLabeledButton.java5
-rw-r--r--java/com/android/incallui/incall/impl/res/values/dimens.xml1
29 files changed, 38 insertions, 11 deletions
diff --git a/assets/quantum/res/drawable-hdpi/quantum_ic_call_merge_white_36.png b/assets/quantum/res/drawable-hdpi/quantum_ic_call_merge_white_36.png
deleted file mode 100644
index b7aba8072..000000000
--- a/assets/quantum/res/drawable-hdpi/quantum_ic_call_merge_white_36.png
+++ /dev/null
Binary files differ
diff --git a/assets/quantum/res/drawable-hdpi/quantum_ic_dialpad_white_36.png b/assets/quantum/res/drawable-hdpi/quantum_ic_dialpad_white_36.png
deleted file mode 100644
index 82710e72a..000000000
--- a/assets/quantum/res/drawable-hdpi/quantum_ic_dialpad_white_36.png
+++ /dev/null
Binary files differ
diff --git a/assets/quantum/res/drawable-hdpi/quantum_ic_group_white_36.png b/assets/quantum/res/drawable-hdpi/quantum_ic_group_white_36.png
deleted file mode 100644
index f98a074ac..000000000
--- a/assets/quantum/res/drawable-hdpi/quantum_ic_group_white_36.png
+++ /dev/null
Binary files differ
diff --git a/assets/quantum/res/drawable-hdpi/quantum_ic_pause_white_36.png b/assets/quantum/res/drawable-hdpi/quantum_ic_pause_white_36.png
deleted file mode 100644
index 1d024393a..000000000
--- a/assets/quantum/res/drawable-hdpi/quantum_ic_pause_white_36.png
+++ /dev/null
Binary files differ
diff --git a/assets/quantum/res/drawable-hdpi/quantum_ic_videocam_white_36.png b/assets/quantum/res/drawable-hdpi/quantum_ic_videocam_white_36.png
deleted file mode 100644
index 49562a640..000000000
--- a/assets/quantum/res/drawable-hdpi/quantum_ic_videocam_white_36.png
+++ /dev/null
Binary files differ
diff --git a/assets/quantum/res/drawable-mdpi/quantum_ic_call_merge_white_36.png b/assets/quantum/res/drawable-mdpi/quantum_ic_call_merge_white_36.png
deleted file mode 100644
index a2eb54bab..000000000
--- a/assets/quantum/res/drawable-mdpi/quantum_ic_call_merge_white_36.png
+++ /dev/null
Binary files differ
diff --git a/assets/quantum/res/drawable-mdpi/quantum_ic_dialpad_white_36.png b/assets/quantum/res/drawable-mdpi/quantum_ic_dialpad_white_36.png
deleted file mode 100644
index 9037f94e8..000000000
--- a/assets/quantum/res/drawable-mdpi/quantum_ic_dialpad_white_36.png
+++ /dev/null
Binary files differ
diff --git a/assets/quantum/res/drawable-mdpi/quantum_ic_group_white_36.png b/assets/quantum/res/drawable-mdpi/quantum_ic_group_white_36.png
deleted file mode 100644
index 25e443424..000000000
--- a/assets/quantum/res/drawable-mdpi/quantum_ic_group_white_36.png
+++ /dev/null
Binary files differ
diff --git a/assets/quantum/res/drawable-mdpi/quantum_ic_pause_white_36.png b/assets/quantum/res/drawable-mdpi/quantum_ic_pause_white_36.png
deleted file mode 100644
index 4d2ea05c4..000000000
--- a/assets/quantum/res/drawable-mdpi/quantum_ic_pause_white_36.png
+++ /dev/null
Binary files differ
diff --git a/assets/quantum/res/drawable-mdpi/quantum_ic_videocam_white_36.png b/assets/quantum/res/drawable-mdpi/quantum_ic_videocam_white_36.png
deleted file mode 100644
index d83e0d50c..000000000
--- a/assets/quantum/res/drawable-mdpi/quantum_ic_videocam_white_36.png
+++ /dev/null
Binary files differ
diff --git a/assets/quantum/res/drawable-xhdpi/quantum_ic_call_merge_white_36.png b/assets/quantum/res/drawable-xhdpi/quantum_ic_call_merge_white_36.png
deleted file mode 100644
index 01daecf65..000000000
--- a/assets/quantum/res/drawable-xhdpi/quantum_ic_call_merge_white_36.png
+++ /dev/null
Binary files differ
diff --git a/assets/quantum/res/drawable-xhdpi/quantum_ic_dialpad_white_36.png b/assets/quantum/res/drawable-xhdpi/quantum_ic_dialpad_white_36.png
deleted file mode 100644
index 175000510..000000000
--- a/assets/quantum/res/drawable-xhdpi/quantum_ic_dialpad_white_36.png
+++ /dev/null
Binary files differ
diff --git a/assets/quantum/res/drawable-xhdpi/quantum_ic_group_white_36.png b/assets/quantum/res/drawable-xhdpi/quantum_ic_group_white_36.png
deleted file mode 100644
index 7f0b7e903..000000000
--- a/assets/quantum/res/drawable-xhdpi/quantum_ic_group_white_36.png
+++ /dev/null
Binary files differ
diff --git a/assets/quantum/res/drawable-xhdpi/quantum_ic_pause_white_36.png b/assets/quantum/res/drawable-xhdpi/quantum_ic_pause_white_36.png
deleted file mode 100644
index 7192ad487..000000000
--- a/assets/quantum/res/drawable-xhdpi/quantum_ic_pause_white_36.png
+++ /dev/null
Binary files differ
diff --git a/assets/quantum/res/drawable-xhdpi/quantum_ic_videocam_white_36.png b/assets/quantum/res/drawable-xhdpi/quantum_ic_videocam_white_36.png
deleted file mode 100644
index 44c28e2f2..000000000
--- a/assets/quantum/res/drawable-xhdpi/quantum_ic_videocam_white_36.png
+++ /dev/null
Binary files differ
diff --git a/assets/quantum/res/drawable-xxhdpi/quantum_ic_call_merge_white_36.png b/assets/quantum/res/drawable-xxhdpi/quantum_ic_call_merge_white_36.png
deleted file mode 100644
index cefef6551..000000000
--- a/assets/quantum/res/drawable-xxhdpi/quantum_ic_call_merge_white_36.png
+++ /dev/null
Binary files differ
diff --git a/assets/quantum/res/drawable-xxhdpi/quantum_ic_dialpad_white_36.png b/assets/quantum/res/drawable-xxhdpi/quantum_ic_dialpad_white_36.png
deleted file mode 100644
index 54ebbafae..000000000
--- a/assets/quantum/res/drawable-xxhdpi/quantum_ic_dialpad_white_36.png
+++ /dev/null
Binary files differ
diff --git a/assets/quantum/res/drawable-xxhdpi/quantum_ic_group_white_36.png b/assets/quantum/res/drawable-xxhdpi/quantum_ic_group_white_36.png
deleted file mode 100644
index 952e15fa6..000000000
--- a/assets/quantum/res/drawable-xxhdpi/quantum_ic_group_white_36.png
+++ /dev/null
Binary files differ
diff --git a/assets/quantum/res/drawable-xxhdpi/quantum_ic_pause_white_36.png b/assets/quantum/res/drawable-xxhdpi/quantum_ic_pause_white_36.png
deleted file mode 100644
index a03bad27e..000000000
--- a/assets/quantum/res/drawable-xxhdpi/quantum_ic_pause_white_36.png
+++ /dev/null
Binary files differ
diff --git a/assets/quantum/res/drawable-xxhdpi/quantum_ic_videocam_white_36.png b/assets/quantum/res/drawable-xxhdpi/quantum_ic_videocam_white_36.png
deleted file mode 100644
index 839af26f8..000000000
--- a/assets/quantum/res/drawable-xxhdpi/quantum_ic_videocam_white_36.png
+++ /dev/null
Binary files differ
diff --git a/assets/quantum/res/drawable-xxxhdpi/quantum_ic_call_merge_white_36.png b/assets/quantum/res/drawable-xxxhdpi/quantum_ic_call_merge_white_36.png
deleted file mode 100644
index 9419ffbbc..000000000
--- a/assets/quantum/res/drawable-xxxhdpi/quantum_ic_call_merge_white_36.png
+++ /dev/null
Binary files differ
diff --git a/assets/quantum/res/drawable-xxxhdpi/quantum_ic_dialpad_white_36.png b/assets/quantum/res/drawable-xxxhdpi/quantum_ic_dialpad_white_36.png
deleted file mode 100644
index a53aeb1d3..000000000
--- a/assets/quantum/res/drawable-xxxhdpi/quantum_ic_dialpad_white_36.png
+++ /dev/null
Binary files differ
diff --git a/assets/quantum/res/drawable-xxxhdpi/quantum_ic_group_white_36.png b/assets/quantum/res/drawable-xxxhdpi/quantum_ic_group_white_36.png
deleted file mode 100644
index dacf29932..000000000
--- a/assets/quantum/res/drawable-xxxhdpi/quantum_ic_group_white_36.png
+++ /dev/null
Binary files differ
diff --git a/assets/quantum/res/drawable-xxxhdpi/quantum_ic_pause_white_36.png b/assets/quantum/res/drawable-xxxhdpi/quantum_ic_pause_white_36.png
deleted file mode 100644
index 3ea7e03e5..000000000
--- a/assets/quantum/res/drawable-xxxhdpi/quantum_ic_pause_white_36.png
+++ /dev/null
Binary files differ
diff --git a/assets/quantum/res/drawable-xxxhdpi/quantum_ic_videocam_white_36.png b/assets/quantum/res/drawable-xxxhdpi/quantum_ic_videocam_white_36.png
deleted file mode 100644
index eff5923da..000000000
--- a/assets/quantum/res/drawable-xxxhdpi/quantum_ic_videocam_white_36.png
+++ /dev/null
Binary files differ
diff --git a/assets/quantum/res/drawable/quantum_ic_call_merge_vd_theme_24.xml b/assets/quantum/res/drawable/quantum_ic_call_merge_vd_theme_24.xml
new file mode 100644
index 000000000..660faf4d6
--- /dev/null
+++ b/assets/quantum/res/drawable/quantum_ic_call_merge_vd_theme_24.xml
@@ -0,0 +1,25 @@
+<!--
+ ~ Copyright (C) 2018 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
+ -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M17,20.41L18.41,19 15,15.59 13.59,17 17,20.41zM7.5,8H11v5.59L5.59,19 7,20.41l6,-6V8h3.5L12,3.5 7.5,8z"/>
+</vector>
diff --git a/java/com/android/incallui/incall/impl/ButtonController.java b/java/com/android/incallui/incall/impl/ButtonController.java
index 5e37a492b..dd11fff33 100644
--- a/java/com/android/incallui/incall/impl/ButtonController.java
+++ b/java/com/android/incallui/incall/impl/ButtonController.java
@@ -293,7 +293,7 @@ interface ButtonController {
R.string.incall_content_description_muted,
R.string.incall_content_description_unmuted,
R.string.incall_label_mute,
- R.drawable.quantum_ic_mic_off_white_36);
+ R.drawable.quantum_ic_mic_off_vd_theme_24);
}
@Override
@@ -312,7 +312,7 @@ interface ButtonController {
private CheckableLabeledButton button;
@StringRes private int label = R.string.incall_label_speaker;
- @DrawableRes private int icon = R.drawable.quantum_ic_volume_up_white_36;
+ @DrawableRes private int icon = R.drawable.quantum_ic_volume_up_vd_theme_24;
private boolean checkable;
private CharSequence contentDescription;
private CharSequence checkedContentDescription;
@@ -421,7 +421,7 @@ interface ButtonController {
0,
0,
R.string.incall_label_dialpad,
- R.drawable.quantum_ic_dialpad_white_36);
+ R.drawable.quantum_ic_dialpad_vd_theme_24);
}
@Override
@@ -439,7 +439,7 @@ interface ButtonController {
R.string.incall_content_description_unhold,
R.string.incall_content_description_hold,
R.string.incall_label_hold,
- R.drawable.quantum_ic_pause_white_36);
+ R.drawable.quantum_ic_pause_vd_theme_24);
}
@Override
@@ -474,7 +474,7 @@ interface ButtonController {
InCallButtonIds.BUTTON_SWAP,
R.string.incall_content_description_swap_calls,
R.string.incall_label_swap,
- R.drawable.quantum_ic_swap_calls_white_36);
+ R.drawable.quantum_ic_swap_calls_vd_theme_24);
Assert.isNotNull(delegate);
}
@@ -492,7 +492,7 @@ interface ButtonController {
InCallButtonIds.BUTTON_MERGE,
R.string.incall_content_description_merge_calls,
R.string.incall_label_merge,
- R.drawable.quantum_ic_call_merge_white_36);
+ R.drawable.quantum_ic_call_merge_vd_theme_24);
Assert.isNotNull(delegate);
}
@@ -510,7 +510,7 @@ interface ButtonController {
InCallButtonIds.BUTTON_UPGRADE_TO_VIDEO,
0,
R.string.incall_label_videocall,
- R.drawable.quantum_ic_videocam_white_36);
+ R.drawable.quantum_ic_videocam_vd_theme_24);
Assert.isNotNull(delegate);
}
@@ -530,7 +530,7 @@ interface ButtonController {
InCallButtonIds.BUTTON_MANAGE_VOICE_CONFERENCE,
R.string.a11y_description_incall_label_manage_content,
R.string.incall_label_manage,
- R.drawable.quantum_ic_group_white_36);
+ R.drawable.quantum_ic_group_vd_theme_24);
Assert.isNotNull(inCallScreenDelegate);
this.inCallScreenDelegate = inCallScreenDelegate;
}
@@ -551,7 +551,7 @@ interface ButtonController {
InCallButtonIds.BUTTON_SWITCH_TO_SECONDARY,
R.string.incall_content_description_swap_calls,
R.string.incall_label_swap,
- R.drawable.quantum_ic_swap_calls_white_36);
+ R.drawable.quantum_ic_swap_calls_vd_theme_24);
Assert.isNotNull(inCallScreenDelegate);
this.inCallScreenDelegate = inCallScreenDelegate;
}
diff --git a/java/com/android/incallui/incall/impl/CheckableLabeledButton.java b/java/com/android/incallui/incall/impl/CheckableLabeledButton.java
index ca018acc2..03e6e3700 100644
--- a/java/com/android/incallui/incall/impl/CheckableLabeledButton.java
+++ b/java/com/android/incallui/incall/impl/CheckableLabeledButton.java
@@ -34,7 +34,6 @@ import android.view.Gravity;
import android.view.SoundEffectConstants;
import android.widget.Checkable;
import android.widget.ImageView;
-import android.widget.ImageView.ScaleType;
import android.widget.LinearLayout;
import android.widget.TextView;
@@ -82,13 +81,15 @@ public class CheckableLabeledButton extends LinearLayout implements Checkable {
setPadding(paddingSize, paddingSize, paddingSize, paddingSize);
int iconSize = getResources().getDimensionPixelSize(R.dimen.incall_labeled_button_size);
+ int imageSize = getResources().getDimensionPixelSize(R.dimen.incall_labeled_button_icon_size);
+ int iconPadding = (iconSize - imageSize) / 2;
iconView = new ImageView(context, null, android.R.style.Widget_Material_Button_Colored);
LayoutParams iconParams = generateDefaultLayoutParams();
iconParams.width = iconSize;
iconParams.height = iconSize;
iconView.setLayoutParams(iconParams);
- iconView.setScaleType(ScaleType.CENTER_INSIDE);
+ iconView.setPadding(iconPadding, iconPadding, iconPadding, iconPadding);
iconView.setImageDrawable(icon);
iconView.setImageTintMode(Mode.SRC_IN);
iconView.setImageTintList(getResources().getColorStateList(R.color.incall_button_icon, null));
diff --git a/java/com/android/incallui/incall/impl/res/values/dimens.xml b/java/com/android/incallui/incall/impl/res/values/dimens.xml
index 076a7d7dd..439dc1d33 100644
--- a/java/com/android/incallui/incall/impl/res/values/dimens.xml
+++ b/java/com/android/incallui/incall/impl/res/values/dimens.xml
@@ -23,6 +23,7 @@
<dimen name="incall_button_vertical_padding">8dp</dimen>
<dimen name="incall_avatar_size">0dp</dimen>
<dimen name="incall_labeled_button_size">48dp</dimen>
+ <dimen name="incall_labeled_button_icon_size">36dp</dimen>
<dimen name="tools_button_height">76dp</dimen>
<dimen name="incall_window_margin_horizontal">24dp</dimen>