diff options
author | Andrew Lee <anwlee@google.com> | 2014-05-09 17:11:01 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2014-05-09 17:11:09 -0700 |
commit | 6cc6cfe9aa486e7232c9305272e2f1074eae5115 (patch) | |
tree | 00247e34816a683cb0326b5bd74b28292c912019 | |
parent | 56021c74461fef9783cfc853afdac96e7b7a3bdf (diff) |
Add touch feedback tint to end call button.
Bug: 14108639
Change-Id: I618e802da139c147a22d0a4e60b50ac25c5a50c7
7 files changed, 7 insertions, 122 deletions
diff --git a/InCallUI/res/drawable/end_call_background.xml b/InCallUI/res/drawable/end_call_background.xml index 24b437482..4477d9e30 100644 --- a/InCallUI/res/drawable/end_call_background.xml +++ b/InCallUI/res/drawable/end_call_background.xml @@ -15,8 +15,8 @@ --> <!-- Background drawable used to render the "end call" button. --> -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:state_enabled="false" android:drawable="@color/end_call_disabled_color" /> - <item android:state_pressed="true" android:drawable="@color/end_call_pressed_color" /> - <item android:drawable="@color/end_call_active_color" /> -</selector> +<touch-feedback xmlns:android="http://schemas.android.com/apk/res/android" + android:tint="@color/end_call_touch_feedback_tint" + android:pinned="true"> + <item android:drawable="@drawable/fab_red_background" /> +</touch-feedback> diff --git a/InCallUI/res/drawable/floating_end_button_active_background.xml b/InCallUI/res/drawable/floating_end_button_active_background.xml deleted file mode 100644 index 935c93721..000000000 --- a/InCallUI/res/drawable/floating_end_button_active_background.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2014 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. ---> - -<shape - xmlns:android="http://schemas.android.com/apk/res/android" - android:shape="oval" > - <corners - android:radius="@dimen/floating_action_button_radius" /> - <size - android:width="@dimen/floating_action_button_width" - android:height="@dimen/floating_action_button_height" /> - <solid - android:color="@color/end_call_active_color" /> -</shape>
\ No newline at end of file diff --git a/InCallUI/res/drawable/floating_end_button_compound_background.xml b/InCallUI/res/drawable/floating_end_button_compound_background.xml deleted file mode 100644 index 433545b84..000000000 --- a/InCallUI/res/drawable/floating_end_button_compound_background.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2014 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. ---> - -<!-- Background drawable used to render the floating circular "end call" button. --> -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:state_enabled="false" - android:drawable="@drawable/floating_end_button_disabled_background" /> - <item android:state_pressed="true" - android:drawable="@drawable/floating_end_button_pressed_background" /> - <item android:drawable="@drawable/fab_red_background" /> -</selector> diff --git a/InCallUI/res/drawable/floating_end_button_disabled_background.xml b/InCallUI/res/drawable/floating_end_button_disabled_background.xml deleted file mode 100644 index 3772b00b0..000000000 --- a/InCallUI/res/drawable/floating_end_button_disabled_background.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2014 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. ---> - -<shape - xmlns:android="http://schemas.android.com/apk/res/android" - android:shape="oval" > - <corners - android:radius="@dimen/floating_action_button_radius" /> - <size - android:width="@dimen/floating_action_button_width" - android:height="@dimen/floating_action_button_height" /> - <solid - android:color="@color/end_call_disabled_color" /> -</shape>
\ No newline at end of file diff --git a/InCallUI/res/drawable/floating_end_button_pressed_background.xml b/InCallUI/res/drawable/floating_end_button_pressed_background.xml deleted file mode 100644 index cd58a84e7..000000000 --- a/InCallUI/res/drawable/floating_end_button_pressed_background.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2014 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. ---> - -<shape - xmlns:android="http://schemas.android.com/apk/res/android" - android:shape="oval" > - <corners - android:radius="@dimen/floating_action_button_radius" /> - <size - android:width="@dimen/floating_action_button_width" - android:height="@dimen/floating_action_button_height" /> - <solid - android:color="@color/end_call_pressed_color" /> -</shape>
\ No newline at end of file diff --git a/InCallUI/res/layout/call_card.xml b/InCallUI/res/layout/call_card.xml index 91ee1c629..f2e5b1865 100644 --- a/InCallUI/res/layout/call_card.xml +++ b/InCallUI/res/layout/call_card.xml @@ -99,7 +99,7 @@ android:layout_width="@dimen/floating_action_button_width" android:layout_height="@dimen/floating_action_button_height" android:layout_marginBottom="@dimen/end_call_button_margin_bottom" - android:background="@drawable/floating_end_button_compound_background" + android:background="@drawable/end_call_background" android:src="@drawable/fab_ic_end_call" android:contentDescription="@string/onscreenEndCallText" /> diff --git a/InCallUI/res/values/colors.xml b/InCallUI/res/values/colors.xml index 1aebb1bfe..c20d4a689 100644 --- a/InCallUI/res/values/colors.xml +++ b/InCallUI/res/values/colors.xml @@ -41,14 +41,7 @@ <!-- Used with some smaller texts in manage conference screen. --> <color name="manage_conference_secondary_text_color">#888888</color> - <!-- Used when the End Call button is active --> - <color name="end_call_active_color">#f22121</color> - - <!-- Used when the End Call button is pressed --> - <color name="end_call_pressed_color">#ff4e4e</color> - - <!-- Used when the End Call button is disabled --> - <color name="end_call_disabled_color">#303030</color> + <color name="end_call_touch_feedback_tint">#dddddd</color> <!-- Color of dialpad digits --> <color name="dialpad_digits_text_color">#000000</color> |