summaryrefslogtreecommitdiff
path: root/InCallUI/res
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-05-15 09:35:23 -0700
committerYorke Lee <yorkelee@google.com>2014-05-15 14:41:06 -0700
commit8ef5cf3987ab9f7988d0ce7b033270095e05481d (patch)
tree62c1473a39bb8e7c3e62fdfb7226322b602ceeb0 /InCallUI/res
parentcb2f51bf1acf387f391ca9c8cae8a2344eb2936a (diff)
First pass at Dialer to InCall transition
* Modify InCallActivity to perform an animation only on a new outgoing call * Add an animated scrim to call_card.xml that serves as the backdrop of the full screen animated reveal * Add resize animation * Add circular reveal animation Bug: 14820894 Change-Id: Iaa7e87e8a96dcd269e444a40eadac9d912625c01
Diffstat (limited to 'InCallUI/res')
-rw-r--r--InCallUI/res/layout/call_button_fragment.xml1
-rw-r--r--InCallUI/res/layout/call_card.xml174
-rw-r--r--InCallUI/res/layout/primary_call_info.xml5
-rw-r--r--InCallUI/res/values/styles.xml9
4 files changed, 108 insertions, 81 deletions
diff --git a/InCallUI/res/layout/call_button_fragment.xml b/InCallUI/res/layout/call_button_fragment.xml
index b455241d8..cf21b1dd9 100644
--- a/InCallUI/res/layout/call_button_fragment.xml
+++ b/InCallUI/res/layout/call_button_fragment.xml
@@ -33,7 +33,6 @@
android:id="@+id/bottomButtons"
android:orientation="vertical"
android:layout_width="match_parent"
- android:background="#0000ff"
android:layout_margin="0dp"
android:padding="0dp"
android:layout_height="wrap_content"
diff --git a/InCallUI/res/layout/call_card.xml b/InCallUI/res/layout/call_card.xml
index f2e5b1865..bb12725ff 100644
--- a/InCallUI/res/layout/call_card.xml
+++ b/InCallUI/res/layout/call_card.xml
@@ -16,102 +16,128 @@
~ limitations under the License
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/call_card"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical" >
-
- <!-- The main content of the CallCard is either one or two "call info"
- blocks, depending on whether one or two lines are in use.
+ android:layout_height="match_parent" >
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical" >
- The call_info blocks are stacked vertically inside a CallCard (LinearLayout),
- each with layout_weight="1". If only one line is in use (i.e. the
- common case) then the 2nd call info will be GONE and thus the 1st one
- will expand to fill the full height of the CallCard. -->
+ <!-- The main content of the CallCard is either one or two "call info"
+ blocks, depending on whether one or two lines are in use.
- <!-- Primary "call card" block, for the foreground call. -->
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="5" >
+ The call_info blocks are stacked vertically inside a CallCard (LinearLayout),
+ each with layout_weight="1". If only one line is in use (i.e. the
+ common case) then the 2nd call info will be GONE and thus the 1st one
+ will expand to fill the full height of the CallCard. -->
- <LinearLayout
+ <!-- Primary "call card" block, for the foreground call. -->
+ <FrameLayout
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical" >
+ android:layout_height="0dp"
+ android:layout_weight="5" >
<LinearLayout
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:translationZ="@dimen/primary_call_translation_z" >
-
- <include android:id="@+id/primary_call_info"
- layout="@layout/primary_call_info" />
+ android:layout_height="match_parent"
+ android:orientation="vertical" >
- <fragment android:name="com.android.incallui.CallButtonFragment"
- android:id="@+id/callButtonFragment"
+ <LinearLayout
+ android:id="@+id/primary_call_info_container"
android:layout_width="match_parent"
- android:layout_height="wrap_content" />
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:translationZ="@dimen/primary_call_translation_z"
+ android:background="@color/incall_call_banner_background_color"
+ >
- </LinearLayout>
+ <include layout="@layout/primary_call_info" />
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent" >
+ <fragment android:name="com.android.incallui.CallButtonFragment"
+ android:id="@+id/callButtonFragment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
- <!-- Contact photo for primary call info -->
- <ImageView android:id="@+id/photo"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:gravity="top|center_horizontal"
- android:scaleType="centerCrop"
- android:contentDescription="@string/contactPhoto"
- android:src="@drawable/picture_unknown"/>
-
- <fragment android:name="com.android.incallui.DialpadFragment"
- android:id="@+id/dialpadFragment"
- android:layout_width="match_parent"
- android:layout_height="match_parent" />
+ </LinearLayout>
- <fragment android:name="com.android.incallui.AnswerFragment"
- android:id="@+id/answerFragment"
+ <FrameLayout
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_alignParentBottom="true"
- android:layout_centerHorizontal="true"
- android:gravity="top"
- android:layout_gravity="bottom|center_horizontal"
- android:layout_marginBottom="@dimen/glowpadview_margin_bottom"
- android:visibility="gone" />
+ android:layout_height="match_parent" >
+
+ <!-- Contact photo for primary call info -->
+ <ImageView android:id="@+id/photo"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="top|center_horizontal"
+ android:scaleType="centerCrop"
+ android:contentDescription="@string/contactPhoto"
+ android:src="@drawable/picture_unknown"/>
+
+ <fragment android:name="com.android.incallui.DialpadFragment"
+ android:id="@+id/dialpadFragment"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+
+ <fragment android:name="com.android.incallui.AnswerFragment"
+ android:id="@+id/answerFragment"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_alignParentBottom="true"
+ android:layout_centerHorizontal="true"
+ android:gravity="top"
+ android:layout_gravity="bottom|center_horizontal"
+ android:layout_marginBottom="@dimen/glowpadview_margin_bottom"
+ android:visibility="gone" />
+
+ </FrameLayout>
- </FrameLayout>
+ </LinearLayout>
- </LinearLayout>
+ <FrameLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="bottom|center">
- <FrameLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="bottom|center">
-
- <ImageButton android:id="@+id/endButton"
- 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/end_call_background"
- android:src="@drawable/fab_ic_end_call"
- android:contentDescription="@string/onscreenEndCallText" />
+ <ImageButton android:id="@+id/endButton"
+ 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/end_call_background"
+ android:src="@drawable/fab_ic_end_call"
+ android:contentDescription="@string/onscreenEndCallText" />
+ </FrameLayout>
</FrameLayout>
- </FrameLayout>
+ <!-- Secondary "Call info" block, for the background ("on hold") call. -->
+ <ViewStub android:id="@+id/secondary_call_info"
+ android:layout="@layout/secondary_call_info"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1" />
+
+ </LinearLayout>
- <!-- Secondary "Call info" block, for the background ("on hold") call. -->
- <ViewStub android:id="@+id/secondary_call_info"
- android:layout="@layout/secondary_call_info"
+ <!-- Animated scrim that fills the whole screen and then shrinks to show call details -->
+ <LinearLayout
+ android:id="@+id/animated_scrim"
android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1" />
+ android:layout_height="match_parent"
+ android:visibility="gone"
+ android:orientation="vertical">
+
+ <Space
+ android:id="@+id/animated_scrim_spacer"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="0" />
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ android:background="@color/incall_call_banner_background_color" />
+ </LinearLayout>
-</LinearLayout>
+</FrameLayout>
diff --git a/InCallUI/res/layout/primary_call_info.xml b/InCallUI/res/layout/primary_call_info.xml
index db18e4dfa..d7a2b9d79 100644
--- a/InCallUI/res/layout/primary_call_info.xml
+++ b/InCallUI/res/layout/primary_call_info.xml
@@ -18,7 +18,7 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="wrap_content">
+ android:layout_height="wrap_content" >
<LinearLayout
android:layout_width="match_parent"
@@ -38,8 +38,7 @@
android:paddingStart="@dimen/call_banner_side_padding"
android:paddingEnd="@dimen/call_banner_side_padding"
android:paddingTop="@dimen/call_banner_primary_call_top_padding"
- android:paddingBottom="@dimen/call_banner_top_bottom_padding"
- android:background="@color/incall_call_banner_background_color">
+ android:paddingBottom="@dimen/call_banner_top_bottom_padding" >
<!-- Name (or the phone number, if we don't have a name to display). -->
<LinearLayout android:id="@+id/stateAndName"
diff --git a/InCallUI/res/values/styles.xml b/InCallUI/res/values/styles.xml
index c5b5d4722..747a324e4 100644
--- a/InCallUI/res/values/styles.xml
+++ b/InCallUI/res/values/styles.xml
@@ -112,13 +112,16 @@
<item name="android:taskToFrontExitAnimation">@anim/activity_open_exit</item>
</style>
- <!-- Theme for the InCallActivity activity. This gives us a totally black
- window background instead of the default dark grey. (We don't just use
+ <!-- Theme for the InCallActivity activity. Should have a transparent background for the
+ circular reveal animation for a new outgoing call to work correctly. We don't just use
Theme.Black.NoTitleBar directly, since we want any popups or dialogs
from the InCallActivity to have the correct holo style. -->
<style name="Theme.InCallScreen" parent="@android:style/Theme.Holo.NoActionBar">
- <item name="android:windowBackground">@android:color/black</item>
<item name="android:windowAnimationStyle">@style/InCallAnimationStyle</item>
+ <item name="android:windowIsTranslucent">true</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowContentOverlay">@null</item>
+ <item name="android:windowNoTitle">true</item>
</style>
<style name="PrimaryCallInfoPrimaryCallBanner">