summaryrefslogtreecommitdiff
path: root/InCallUI/res
diff options
context:
space:
mode:
authorNancy Chen <nancychen@google.com>2014-10-24 16:00:55 -0700
committerNancy Chen <nancychen@google.com>2014-10-29 22:42:49 +0000
commit991acb8d1b00d68e2be118cae5e9396d1127d5bb (patch)
tree831436338bb29e872f0d7eaf66024f411aa53f35 /InCallUI/res
parente05642ba64551c6fc96dee79e65d223f9326a749 (diff)
In Multi-SIM cases use the color of the SIM icon for InCallUI.
Set the color of the InCallUI to be the color of the SIM icon. In the single SIM case, the background should be the default background. * Added id to all call button backgrounds for color change * Initialize color onResume for InCallActivity * CallCardFragment/CallButtonFragment/DialpadFragment update their colors * Added InCallUIMaterialColorMapUtils to extract color Bug: 17971273 Change-Id: Ia247b153b57ffc8a5277d521c433ab0be6696cf6
Diffstat (limited to 'InCallUI/res')
-rw-r--r--InCallUI/res/drawable/btn_add.xml5
-rw-r--r--InCallUI/res/drawable/btn_change_to_video.xml3
-rw-r--r--InCallUI/res/drawable/btn_change_to_voice.xml3
-rw-r--r--InCallUI/res/drawable/btn_compound_background.xml2
-rw-r--r--InCallUI/res/drawable/btn_compound_dialpad.xml3
-rw-r--r--InCallUI/res/drawable/btn_compound_hold.xml3
-rw-r--r--InCallUI/res/drawable/btn_compound_mute.xml3
-rw-r--r--InCallUI/res/drawable/btn_compound_video_off.xml3
-rw-r--r--InCallUI/res/drawable/btn_compound_video_switch.xml3
-rw-r--r--InCallUI/res/drawable/btn_merge.xml3
-rw-r--r--InCallUI/res/drawable/btn_overflow.xml3
-rw-r--r--InCallUI/res/drawable/btn_swap.xml3
-rw-r--r--InCallUI/res/layout/call_button_fragment.xml2
-rw-r--r--InCallUI/res/values/colors.xml27
14 files changed, 52 insertions, 14 deletions
diff --git a/InCallUI/res/drawable/btn_add.xml b/InCallUI/res/drawable/btn_add.xml
index 515d65b00..7d5e90f71 100644
--- a/InCallUI/res/drawable/btn_add.xml
+++ b/InCallUI/res/drawable/btn_add.xml
@@ -18,12 +18,13 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:drawable="@drawable/btn_background" />
+ <item android:id="@+id/backgroundItem"
+ android:drawable="@drawable/btn_background" />
<item>
<bitmap android:src="@drawable/ic_toolbar_add_call"
android:gravity="center"
android:tint="@color/selectable_icon_tint" />
</item>
-
+
</layer-list> \ No newline at end of file
diff --git a/InCallUI/res/drawable/btn_change_to_video.xml b/InCallUI/res/drawable/btn_change_to_video.xml
index 962539e4f..a26cee3e9 100644
--- a/InCallUI/res/drawable/btn_change_to_video.xml
+++ b/InCallUI/res/drawable/btn_change_to_video.xml
@@ -18,7 +18,8 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:drawable="@drawable/btn_background" />
+ <item android:id="@+id/backgroundItem"
+ android:drawable="@drawable/btn_background" />
<item>
<bitmap android:src="@drawable/ic_toolbar_video"
diff --git a/InCallUI/res/drawable/btn_change_to_voice.xml b/InCallUI/res/drawable/btn_change_to_voice.xml
index fdeae071b..86a7f21d5 100644
--- a/InCallUI/res/drawable/btn_change_to_voice.xml
+++ b/InCallUI/res/drawable/btn_change_to_voice.xml
@@ -18,7 +18,8 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:drawable="@drawable/btn_background" />
+ <item android:id="@+id/backgroundItem"
+ android:drawable="@drawable/btn_background" />
<item>
<bitmap android:src="@drawable/ic_toolbar_audio_phone"
diff --git a/InCallUI/res/drawable/btn_compound_background.xml b/InCallUI/res/drawable/btn_compound_background.xml
index 93e6c311a..36aab0df7 100644
--- a/InCallUI/res/drawable/btn_compound_background.xml
+++ b/InCallUI/res/drawable/btn_compound_background.xml
@@ -24,7 +24,7 @@
android:drawable="@drawable/btn_selected_focused" />
<item android:state_focused="true"
- android:drawable="@drawable/btn_unselected_focused" />cd
+ android:drawable="@drawable/btn_unselected_focused" />
<item android:state_selected="true"
android:drawable="@drawable/btn_selected" />
diff --git a/InCallUI/res/drawable/btn_compound_dialpad.xml b/InCallUI/res/drawable/btn_compound_dialpad.xml
index fcd9a3c0f..1b78ead44 100644
--- a/InCallUI/res/drawable/btn_compound_dialpad.xml
+++ b/InCallUI/res/drawable/btn_compound_dialpad.xml
@@ -18,7 +18,8 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The standard "compound button" background. -->
- <item android:drawable="@drawable/btn_compound_background" />
+ <item android:id="@+id/compoundBackgroundItem"
+ android:drawable="@drawable/btn_compound_background" />
<!-- ...and the actual icon on top. Use an explicit <bitmap> to avoid scaling
the icon up to the full size of the button. -->
diff --git a/InCallUI/res/drawable/btn_compound_hold.xml b/InCallUI/res/drawable/btn_compound_hold.xml
index dcf95073a..7974efae5 100644
--- a/InCallUI/res/drawable/btn_compound_hold.xml
+++ b/InCallUI/res/drawable/btn_compound_hold.xml
@@ -18,7 +18,8 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The standard "compound button" background. -->
- <item android:drawable="@drawable/btn_compound_background" />
+ <item android:id="@+id/compoundBackgroundItem"
+ android:drawable="@drawable/btn_compound_background" />
<!-- ...and the actual icon on top. Use an explicit <bitmap> to avoid scaling
the icon up to the full size of the button. -->
diff --git a/InCallUI/res/drawable/btn_compound_mute.xml b/InCallUI/res/drawable/btn_compound_mute.xml
index 68a8c9b34..86708fb0c 100644
--- a/InCallUI/res/drawable/btn_compound_mute.xml
+++ b/InCallUI/res/drawable/btn_compound_mute.xml
@@ -18,7 +18,8 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The standard "compound button" background. -->
- <item android:drawable="@drawable/btn_compound_background" />
+ <item android:id="@+id/compoundBackgroundItem"
+ android:drawable="@drawable/btn_compound_background" />
<!-- Use an explicit <bitmap> to avoid scaling the icon up to the full size of the button. -->
<item>
diff --git a/InCallUI/res/drawable/btn_compound_video_off.xml b/InCallUI/res/drawable/btn_compound_video_off.xml
index 8af4209d3..b942cd0c3 100644
--- a/InCallUI/res/drawable/btn_compound_video_off.xml
+++ b/InCallUI/res/drawable/btn_compound_video_off.xml
@@ -19,7 +19,8 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The standard "compound button" background. -->
- <item android:drawable="@drawable/btn_compound_background" />
+ <item android:id="@+id/compoundBackgroundItem"
+ android:drawable="@drawable/btn_compound_background" />
<!-- Use an explicit <bitmap> to avoid scaling the icon up to the full size of the button. -->
<item>
diff --git a/InCallUI/res/drawable/btn_compound_video_switch.xml b/InCallUI/res/drawable/btn_compound_video_switch.xml
index ef171ab9c..f8111866e 100644
--- a/InCallUI/res/drawable/btn_compound_video_switch.xml
+++ b/InCallUI/res/drawable/btn_compound_video_switch.xml
@@ -19,7 +19,8 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The standard "compound button" background. -->
- <item android:drawable="@drawable/btn_compound_background" />
+ <item android:id="@+id/compoundBackgroundItem"
+ android:drawable="@drawable/btn_compound_background" />
<!-- Use an explicit <bitmap> to avoid scaling the icon up to the full size of the button. -->
<item>
diff --git a/InCallUI/res/drawable/btn_merge.xml b/InCallUI/res/drawable/btn_merge.xml
index 78e19749f..2b4818a47 100644
--- a/InCallUI/res/drawable/btn_merge.xml
+++ b/InCallUI/res/drawable/btn_merge.xml
@@ -18,7 +18,8 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:drawable="@drawable/btn_background" />
+ <item android:id="@+id/backgroundItem"
+ android:drawable="@drawable/btn_background" />
<item>
<bitmap android:src="@drawable/ic_toolbar_merge"
diff --git a/InCallUI/res/drawable/btn_overflow.xml b/InCallUI/res/drawable/btn_overflow.xml
index e851eceb4..2eb26cc14 100644
--- a/InCallUI/res/drawable/btn_overflow.xml
+++ b/InCallUI/res/drawable/btn_overflow.xml
@@ -18,7 +18,8 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:drawable="@drawable/btn_background" />
+ <item android:id="@+id/backgroundItem"
+ android:drawable="@drawable/btn_background" />
<item>
<bitmap android:src="@drawable/ic_overflow_menu"
diff --git a/InCallUI/res/drawable/btn_swap.xml b/InCallUI/res/drawable/btn_swap.xml
index 7a8241123..5d6c8ecaf 100644
--- a/InCallUI/res/drawable/btn_swap.xml
+++ b/InCallUI/res/drawable/btn_swap.xml
@@ -18,7 +18,8 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:drawable="@drawable/btn_background" />
+ <item android:id="@+id/backgroundItem"
+ android:drawable="@drawable/btn_background" />
<item>
<bitmap android:src="@drawable/ic_toolbar_swap"
diff --git a/InCallUI/res/layout/call_button_fragment.xml b/InCallUI/res/layout/call_button_fragment.xml
index aa87d0c1a..56d65b07f 100644
--- a/InCallUI/res/layout/call_button_fragment.xml
+++ b/InCallUI/res/layout/call_button_fragment.xml
@@ -35,6 +35,7 @@
android:layout_width="match_parent"
android:layout_margin="0dp"
android:padding="0dp"
+ android:background="@color/button_background_color"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:animateLayoutChanges="true"
@@ -46,7 +47,6 @@
android:layout_height="wrap_content"
android:paddingStart="@dimen/button_cluster_horizontal_padding"
android:paddingEnd="@dimen/button_cluster_horizontal_padding"
- android:background="@color/button_background_color"
android:gravity="bottom|center_horizontal">
<!-- This row only ever shows either 4 or 5 buttons. This may depend on whether the device
diff --git a/InCallUI/res/values/colors.xml b/InCallUI/res/values/colors.xml
index f691fe2d0..05c2cf139 100644
--- a/InCallUI/res/values/colors.xml
+++ b/InCallUI/res/values/colors.xml
@@ -76,4 +76,31 @@
<!-- 20% opacity, theme color. -->
<color name="incall_dialpad_touch_tint">#330288d1</color>
+
+ <!-- Background colors for InCallUI. This set of colors is a subset of
+ https://spec.googleplex.com/quantumpalette#extended which pass WCAG AA and all have a
+ contrast ratio over 5:1.
+
+ These colors are also used by InCallUIMaterialColorMapUtils to generate primary
+ activity colors.
+ -->
+ <array name="background_colors">
+ <item>#00796B</item>
+ <item>#3367D6</item>
+ <item>#303F9F</item>
+ <item>#7B1FA2</item>
+ <item>#C2185B</item>
+ <item>#C53929</item>
+ </array>
+
+ <!-- Darker versions of background_colors, two shades darker. These colors are used for the
+ status bar. -->
+ <array name="background_colors_dark">
+ <item>#004D40</item>
+ <item>#1C3AA9</item>
+ <item>#1A237E</item>
+ <item>#4A148C</item>
+ <item>#880E4F</item>
+ <item>#A52714</item>
+ </array>
</resources>