Video calling landscape changes to match specs
* Call card has 4dp corners, and is 90% visible
* Margins for call card
* Call buttons are center aligned with end call button
* Remote surface is always center aligned, tapping call card slides
it in and out
* Status bar is black
Bug: 19668216
Change-Id: Ifea27faa5f8ff32f6be13e777ca70aa4d0c7727e
diff --git a/InCallUI/res/drawable-land/rounded_call_card_background.xml b/InCallUI/res/drawable-land/rounded_call_card_background.xml
new file mode 100644
index 0000000..f41ecda
--- /dev/null
+++ b/InCallUI/res/drawable-land/rounded_call_card_background.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ ~ Copyright (C) 2015 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">
+ <solid android:color="@color/incall_call_banner_background_color" />
+ <corners
+ android:radius="4dp" />
+</shape>
\ No newline at end of file
diff --git a/InCallUI/res/layout-land/call_card_fragment.xml b/InCallUI/res/layout-land/call_card_fragment.xml
index fb880e3..edce7b2 100644
--- a/InCallUI/res/layout-land/call_card_fragment.xml
+++ b/InCallUI/res/layout-land/call_card_fragment.xml
@@ -28,22 +28,25 @@
android:layout_height="match_parent"
android:orientation="vertical"
android:elevation="@dimen/primary_call_elevation"
- android:background="@color/incall_call_banner_background_color"
+ android:background="@drawable/rounded_call_card_background"
android:paddingTop="@dimen/call_banner_primary_call_container_top_padding"
android:clipChildren="false"
- android:clipToPadding="false" >
+ android:clipToPadding="false"
+ android:alpha="0.9"
+ android:layout_margin="10dp">
<include layout="@layout/primary_call_info" />
- <fragment android:name="com.android.incallui.CallButtonFragment"
- android:id="@+id/callButtonFragment"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
-
<FrameLayout
- android:layout_width="match_parent"
+ android:layout_width="wrap_content"
android:layout_height="match_parent" >
+ <fragment android:name="com.android.incallui.CallButtonFragment"
+ android:id="@+id/callButtonFragment"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="bottom"
+ android:layout_marginBottom="@dimen/call_buttons_bottom_margin" />
<!-- Secondary "Call info" block, for the background ("on hold") call. -->
<include layout="@layout/secondary_call_info"
android:layout_width="match_parent"
diff --git a/InCallUI/res/values-land/colors.xml b/InCallUI/res/values-land/colors.xml
new file mode 100644
index 0000000..77eea2e
--- /dev/null
+++ b/InCallUI/res/values-land/colors.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2015 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
+ -->
+
+<resources>
+ <!-- Background color for status bar. For portrait this will be ignored. -->
+ <color name="statusbar_background_color">#000000</color>
+</resources>
diff --git a/InCallUI/res/values-land/dimens.xml b/InCallUI/res/values-land/dimens.xml
index d992ccd..59a5a9a 100644
--- a/InCallUI/res/values-land/dimens.xml
+++ b/InCallUI/res/values-land/dimens.xml
@@ -16,6 +16,11 @@
-->
<resources>
+ <!-- Whether or not the landscape mode layout is currently being used -->
+ <bool name="is_layout_landscape">true</bool>
<!-- Height and width of the in-call buttons. -->
<dimen name="in_call_button_dimension">40dp</dimen>
+ <!-- Margin underneath the call buttons. This is used only in landscape mode and is sized
+ so that the call buttons are center aligned with the end call button. -->
+ <dimen name="call_buttons_bottom_margin">30dp</dimen>
</resources>
diff --git a/InCallUI/res/values/colors.xml b/InCallUI/res/values/colors.xml
index afc557b..cac382d 100644
--- a/InCallUI/res/values/colors.xml
+++ b/InCallUI/res/values/colors.xml
@@ -59,6 +59,8 @@
<!-- Background color of action bars -->
<color name="actionbar_background_color">@color/dialer_theme_color</color>
+ <!-- Background color for status bar. For portrait this will be ignored. -->
+ <color name="statusbar_background_color">@color/dialer_theme_color</color>
<color name="translucent_shadow">#33999999</color>
diff --git a/InCallUI/res/values/dimens.xml b/InCallUI/res/values/dimens.xml
index 43307e8..0739234 100644
--- a/InCallUI/res/values/dimens.xml
+++ b/InCallUI/res/values/dimens.xml
@@ -16,6 +16,9 @@
-->
<resources>
+ <!-- Whether or not the landscape mode layout is currently being used -->
+ <bool name="is_layout_landscape">false</bool>
+
<!-- Dimensions for CallCard elements (the normal in-call UI) -->
<!-- Height of the "call banner" overlay on top of the upper part of the call info area.
@@ -67,7 +70,7 @@
<dimen name="dialpad_digits_adjustable_height">50dp</dimen>
<dimen name="dialpad_key_numbers_size">36dp</dimen>
- <dimen name="floating_action_bar_vertical_offset">-24dp</dimen>
+ <dimen name="floating_action_button_vertical_offset">-24dp</dimen>
<dimen name="call_button_margin_vertical">8dp</dimen>
<dimen name="call_button_margin_horizontal">6dp</dimen>