summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorStephen Bird <sbird@cyngn.com>2016-05-02 09:39:57 -0700
committerRichard MacGregor <rmacgregor@cyngn.com>2016-05-09 08:58:38 -0700
commit1513c75c14068c3a43f66ffa2431572896c76c96 (patch)
tree7329a892e8e88e98188ed6bed4a4dda2939f3dae /res
parentf023f97370cfbe775a1fab04da3699e0f82c066b (diff)
downloadandroid_packages_apps_InCallUI-1513c75c14068c3a43f66ffa2431572896c76c96.tar.gz
android_packages_apps_InCallUI-1513c75c14068c3a43f66ffa2431572896c76c96.tar.bz2
android_packages_apps_InCallUI-1513c75c14068c3a43f66ffa2431572896c76c96.zip
Move Mod plugins out of CallButtonFragment to ModButtonFragment
Things were getting crowded. Add a new button bar explicitly for plugins. Tickets CD-592 & NOTES-101 Change-Id: I1bdf074d8e3417161eb29cf05140016b084c5006
Diffstat (limited to 'res')
-rw-r--r--res/color/mod_icon_tint.xml24
-rw-r--r--res/drawable/btn_mod_background.xml33
-rw-r--r--res/drawable/btn_mod_drawable.xml31
-rw-r--r--res/drawable/btn_mod_unselected.xml25
-rw-r--r--res/drawable/ic_video.xml14
-rw-r--r--res/layout-land/call_card_fragment.xml20
-rw-r--r--res/layout/call_card_fragment.xml5
-rw-r--r--res/layout/mod_button_fragment.xml62
-rw-r--r--res/values-land/cm_dimens.xml21
-rw-r--r--res/values/cm_colors.xml2
-rw-r--r--res/values/cm_dimens.xml4
-rw-r--r--res/values/cm_strings.xml1
-rw-r--r--res/values/cm_styles.xml30
13 files changed, 266 insertions, 6 deletions
diff --git a/res/color/mod_icon_tint.xml b/res/color/mod_icon_tint.xml
new file mode 100644
index 00000000..37138002
--- /dev/null
+++ b/res/color/mod_icon_tint.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The CyanogenMod 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:color="@color/button_disabled_color" android:state_enabled="false" />
+ <item android:color="@color/incall_accent_color" android:state_selected="true" />
+ <item android:color="@color/incall_accent_color" android:state_pressed="true" />
+ <item android:color="@color/button_default_color" />
+</selector>
+
diff --git a/res/drawable/btn_mod_background.xml b/res/drawable/btn_mod_background.xml
new file mode 100644
index 00000000..e212d4d8
--- /dev/null
+++ b/res/drawable/btn_mod_background.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The CyanogenMod 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 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. -->
+<ripple xmlns:android="http://schemas.android.com/apk/res/android"
+ android:color="@color/incall_accent_color">
+ <item>
+ <selector>
+
+ <item android:state_focused="true"
+ android:drawable="@drawable/btn_unselected_focused" />
+
+ <item android:drawable="@drawable/btn_mod_unselected" />
+
+ </selector>
+ </item>
+</ripple>
diff --git a/res/drawable/btn_mod_drawable.xml b/res/drawable/btn_mod_drawable.xml
new file mode 100644
index 00000000..d69887d0
--- /dev/null
+++ b/res/drawable/btn_mod_drawable.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ Copyright (C) 2016 The CyanogenMod 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:id="@+id/backgroundItem"
+ android:drawable="@drawable/btn_mod_background" />
+
+ <item android:id="@+id/foregroundItem"
+ android:top="@dimen/mod_button_inset"
+ android:right="@dimen/mod_button_inset"
+ android:bottom="@dimen/mod_button_inset"
+ android:left="@dimen/mod_button_inset"
+ android:drawable="@drawable/ic_video"/>
+
+</layer-list> \ No newline at end of file
diff --git a/res/drawable/btn_mod_unselected.xml b/res/drawable/btn_mod_unselected.xml
new file mode 100644
index 00000000..eaff307f
--- /dev/null
+++ b/res/drawable/btn_mod_unselected.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ Copyright (C) 2016 The CyanogenMod 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/mod_button_background_color" />
+ </shape>
+ </item>
+</layer-list> \ No newline at end of file
diff --git a/res/drawable/ic_video.xml b/res/drawable/ic_video.xml
new file mode 100644
index 00000000..9b23dcb9
--- /dev/null
+++ b/res/drawable/ic_video.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <path
+ android:pathData="M0 0h24v24H0z" />
+ <path
+ android:fillColor="#000000"
+ android:pathData="M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55 .45 1 1 1h12c.55 0 1-.45
+1-1v-3.5l4 4v-11l-4 4z" />
+</vector>
diff --git a/res/layout-land/call_card_fragment.xml b/res/layout-land/call_card_fragment.xml
index dcdd1aa1..8109c33f 100644
--- a/res/layout-land/call_card_fragment.xml
+++ b/res/layout-land/call_card_fragment.xml
@@ -77,18 +77,26 @@
<include layout="@layout/primary_call_info" />
- <FrameLayout
- android:layout_width="wrap_content"
- android:layout_height="match_parent" >
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:gravity="bottom"
+ android:clipChildren="false"
+ android:clipToPadding="false" >
<fragment android:name="com.android.incallui.CallButtonFragment"
android:id="@+id/callButtonFragment"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+
+ <fragment android:name="com.android.incallui.ModButtonFragment"
+ android:id="@+id/modButtonFragment"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_gravity="bottom"
android:layout_marginBottom="@dimen/call_buttons_bottom_margin" />
- </FrameLayout>
+ </LinearLayout>
</LinearLayout>
diff --git a/res/layout/call_card_fragment.xml b/res/layout/call_card_fragment.xml
index ef40b1f4..d5d6e421 100644
--- a/res/layout/call_card_fragment.xml
+++ b/res/layout/call_card_fragment.xml
@@ -72,6 +72,11 @@
android:layout_width="match_parent"
android:layout_height="wrap_content" />
+ <fragment android:name="com.android.incallui.ModButtonFragment"
+ android:id="@+id/modButtonFragment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+
<TextView android:id="@+id/connectionServiceMessage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/res/layout/mod_button_fragment.xml b/res/layout/mod_button_fragment.xml
new file mode 100644
index 00000000..ab96220e
--- /dev/null
+++ b/res/layout/mod_button_fragment.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The CyanogenMod 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.
+-->
+
+<!-- In-call Plugins touch UI elements, used on some platforms.
+ This layout is modeled after call_button_fragment -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/bottomModButtons"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_margin="0dp"
+ android:padding="0dp"
+ android:background="@color/mod_button_background_color"
+ android:layout_height="wrap_content"
+ android:layout_alignParentBottom="true"
+ android:animateLayoutChanges="true" >
+
+ <LinearLayout
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="bottom|center_vertical"
+ android:layout_marginLeft="@dimen/mod_bar_margin_sides"
+ android:layout_marginRight="@dimen/mod_bar_margin_sides"
+ android:baselineAligned="true">
+
+ <ImageButton android:id="@+id/inCallProviders"
+ style="@style/ModButton"
+ android:background="@drawable/btn_mod_drawable"
+ android:contentDescription="@string/onscreenTransferCall"
+ android:visibility="gone" />
+
+ <!-- Take a note for this call -->
+ <ImageButton android:id="@+id/takeNoteButton"
+ style="@style/ModButton"
+ android:background="@drawable/btn_mod_drawable"
+ android:contentDescription="@string/onscreenNoteText"
+ android:visibility="gone" />
+
+ <!-- "Overflow" -->
+ <ImageButton android:id="@+id/overflowButton"
+ style="@style/ModButton"
+ android:background="@drawable/btn_overflow"
+ android:contentDescription="@string/onscreenModOverflowText"
+ android:visibility="gone" />
+
+ </LinearLayout>
+
+</LinearLayout>
diff --git a/res/values-land/cm_dimens.xml b/res/values-land/cm_dimens.xml
new file mode 100644
index 00000000..c091884d
--- /dev/null
+++ b/res/values-land/cm_dimens.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The CyanogenMod 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.
+-->
+
+<resources>
+ <dimen name="mod_button_inset">8dp</dimen>
+ <dimen name="mod_bar_margin_sides">8dp</dimen>
+</resources>
diff --git a/res/values/cm_colors.xml b/res/values/cm_colors.xml
index 4b3f214d..2769a312 100644
--- a/res/values/cm_colors.xml
+++ b/res/values/cm_colors.xml
@@ -33,4 +33,6 @@
<color name="incoming_call_hold_small_circle">#607d8b</color>
<color name="incoming_call_hold_bitmap">#b2ffffff</color>
<color name="incoming_call_sms_circle">#0288d1</color>
+
+ <color name="mod_button_background_color">@color/dialer_theme_color_dark</color>
</resources> \ No newline at end of file
diff --git a/res/values/cm_dimens.xml b/res/values/cm_dimens.xml
index b73349cf..4807b61d 100644
--- a/res/values/cm_dimens.xml
+++ b/res/values/cm_dimens.xml
@@ -49,4 +49,8 @@
<dimen name="incoming_call_widget_small_circle_left_offset">30dp</dimen>
<dimen name="incoming_call_widget_display_text_side_offset">30dp</dimen>
+
+ <dimen name="mod_button_inset">12dp</dimen>
+ <dimen name="mod_button_margin_bottom">0dp</dimen>
+ <dimen name="mod_bar_margin_sides">30dp</dimen>
</resources>
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml
index 18d3a773..03eac4bf 100644
--- a/res/values/cm_strings.xml
+++ b/res/values/cm_strings.xml
@@ -86,4 +86,5 @@
<string name="display_text_target_answer_and_hold_active">HOLD CURRENT CALL AND ANSWER</string>
<string name="display_text_target_answer_and_end_active">END CURRENT CALL AND ANSWER</string>
+ <string name="onscreenModOverflowText">More Mods</string>
</resources>
diff --git a/res/values/cm_styles.xml b/res/values/cm_styles.xml
new file mode 100644
index 00000000..2c563d82
--- /dev/null
+++ b/res/values/cm_styles.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The CyanogenMod 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.
+-->
+
+<resources>
+
+ <!-- Buttons in the main "mod button row" of the in-call onscreen touch UI. -->
+ <style name="ModButton">
+ <item name="android:layout_width">@dimen/in_call_button_dimension</item>
+ <item name="android:layout_height">@dimen/in_call_button_dimension</item>
+ <item name="android:layout_marginBottom">@dimen/mod_button_margin_bottom</item>
+ <item name="android:layout_marginLeft">@dimen/call_button_margin_horizontal</item>
+ <item name="android:layout_marginRight">@dimen/call_button_margin_horizontal</item>
+ <item name="android:background">?android:attr/selectableItemBackground</item>
+ </style>
+
+</resources>