diff options
author | Andrew Lee <anwlee@google.com> | 2014-05-07 11:29:41 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2014-05-07 12:30:43 -0700 |
commit | 70bab107dc2016d5e95d9a09c8479b7ce690ff80 (patch) | |
tree | d9e21a9fac63f80c1a0b86456f76f6457ddfb1ce /InCallUI/res/drawable | |
parent | d354f99d0861dfc3909f5a4b407536a248490b39 (diff) |
Change selected/unselected states of buttons.
- Add touch feedback (w00t).
- Adjust button heights/positions to spec.
- Add drawables for the different button states (no longer tabs).
- Remove vertical spacers (interfered with touch feedback).
Change-Id: I383ca898c8d2fcfc8c34021efc62cb03adbde1c1
Diffstat (limited to 'InCallUI/res/drawable')
-rw-r--r-- | InCallUI/res/drawable/btn_background.xml | 17 | ||||
-rw-r--r-- | InCallUI/res/drawable/btn_compound_background.xml | 29 | ||||
-rw-r--r-- | InCallUI/res/drawable/btn_selected.xml | 25 | ||||
-rw-r--r-- | InCallUI/res/drawable/btn_selected_focused.xml | 29 | ||||
-rw-r--r-- | InCallUI/res/drawable/btn_unselected.xml | 25 | ||||
-rw-r--r-- | InCallUI/res/drawable/btn_unselected_focused.xml | 28 |
6 files changed, 133 insertions, 20 deletions
diff --git a/InCallUI/res/drawable/btn_background.xml b/InCallUI/res/drawable/btn_background.xml index be4644670..fabcf7c65 100644 --- a/InCallUI/res/drawable/btn_background.xml +++ b/InCallUI/res/drawable/btn_background.xml @@ -18,12 +18,15 @@ <!-- Background resource for "compound buttons" in the in-call UI. These buttons have two states (checked and unchecked), and show a blue bar along the bottom edge when checked. --> -<selector xmlns:android="http://schemas.android.com/apk/res/android"> +<touch-feedback xmlns:android="http://schemas.android.com/apk/res/android" + android:tint="@color/tab_pressed_color" + android:pinned="true"> + <selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:state_pressed="true" - android:drawable="@color/tab_pressed_color" /> - <item android:state_focused="true" - android:drawable="@drawable/tab_unselected_focused" /> - <item android:drawable="@android:color/transparent" /> + <item android:state_focused="true" + android:drawable="@drawable/btn_unselected_focused" /> -</selector> + <item android:drawable="@drawable/btn_unselected" /> + + </selector> +</touch-feedback>
\ No newline at end of file diff --git a/InCallUI/res/drawable/btn_compound_background.xml b/InCallUI/res/drawable/btn_compound_background.xml index 5af7cca77..2f5a39d34 100644 --- a/InCallUI/res/drawable/btn_compound_background.xml +++ b/InCallUI/res/drawable/btn_compound_background.xml @@ -15,19 +15,22 @@ --> <!-- Background resource for "compound buttons" in the in-call UI. - These buttons have two states (checked and unchecked), and - show a blue bar along the bottom edge when checked. --> -<selector xmlns:android="http://schemas.android.com/apk/res/android"> + These buttons have two states (selected and unselected). --> +<touch-feedback xmlns:android="http://schemas.android.com/apk/res/android" + android:tint="@color/tab_pressed_color" + android:pinned="true"> + <item> + <selector> + <item android:state_selected="true" android:state_focused="true" + android:drawable="@drawable/btn_selected_focused" /> - <item android:state_pressed="true" - android:drawable="@color/tab_pressed_color" /> - <item android:state_selected="true" android:state_focused="true" - android:drawable="@drawable/tab_selected_focused" /> - <item android:state_focused="true" - android:drawable="@drawable/tab_unselected_focused" /> - <item android:state_selected="true" - android:drawable="@drawable/tab_selected" /> + <item android:state_focused="true" + android:drawable="@drawable/btn_unselected_focused" />cd - <item android:drawable="@android:color/transparent" /> + <item android:state_selected="true" + android:drawable="@drawable/btn_selected" /> -</selector> + <item android:drawable="@drawable/btn_unselected" /> + </selector> + </item> +</touch-feedback>
\ No newline at end of file diff --git a/InCallUI/res/drawable/btn_selected.xml b/InCallUI/res/drawable/btn_selected.xml new file mode 100644 index 000000000..1446e4163 --- /dev/null +++ b/InCallUI/res/drawable/btn_selected.xml @@ -0,0 +1,25 @@ +<?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 + --> + +<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > + <item> + <shape android:shape="oval"> + <solid android:color="@color/button_selected_color" /> + </shape> + </item> +</layer-list>
\ No newline at end of file diff --git a/InCallUI/res/drawable/btn_selected_focused.xml b/InCallUI/res/drawable/btn_selected_focused.xml new file mode 100644 index 000000000..2eda9bf8b --- /dev/null +++ b/InCallUI/res/drawable/btn_selected_focused.xml @@ -0,0 +1,29 @@ +<?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 + --> + +<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > + <item android:drawable="@drawable/btn_selected" /> + + <item> + <shape android:shape="oval" > + <stroke + android:width="4dp" + android:color="@color/focus_color" /> + </shape> + </item> +</layer-list>
\ No newline at end of file diff --git a/InCallUI/res/drawable/btn_unselected.xml b/InCallUI/res/drawable/btn_unselected.xml new file mode 100644 index 000000000..aed995cec --- /dev/null +++ b/InCallUI/res/drawable/btn_unselected.xml @@ -0,0 +1,25 @@ +<?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 + --> + +<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > + <item> + <shape android:shape="oval"> + <solid android:color="@color/incall_background_color" /> + </shape> + </item> +</layer-list>
\ No newline at end of file diff --git a/InCallUI/res/drawable/btn_unselected_focused.xml b/InCallUI/res/drawable/btn_unselected_focused.xml new file mode 100644 index 000000000..66075d427 --- /dev/null +++ b/InCallUI/res/drawable/btn_unselected_focused.xml @@ -0,0 +1,28 @@ +<?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 + --> + +<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > + <item android:drawable="@drawable/btn_unselected" /> + <item> + <shape android:shape="oval" > + <stroke + android:width="4dp" + android:color="@color/focus_color" /> + </shape> + </item> +</layer-list>
\ No newline at end of file |