summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2014-06-05 09:47:56 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-06-05 09:47:56 +0000
commitce1a22ba46d6d999bc461a48d249569c1f5e08c4 (patch)
tree0c1e21fb82da12a2e3cc7496826bff2f4248574d /InCallUI
parentabffbe0a23b2e132a8ba0c9190ce9fba396d238d (diff)
parentc2831f31282a1075612449cc38d0af8069329160 (diff)
am 382b39d1: Update InCallUi styles to redline.
* commit '382b39d1b21c878fdeda387571ad6d9e784c9a73': Update InCallUi styles to redline.
Diffstat (limited to 'InCallUI')
-rw-r--r--InCallUI/res/anim/call_status_pulse.xml22
-rw-r--r--InCallUI/res/layout/call_button_fragment.xml2
-rw-r--r--InCallUI/res/layout/call_card.xml4
-rw-r--r--InCallUI/res/layout/primary_call_info.xml116
-rw-r--r--InCallUI/res/values/colors.xml6
-rw-r--r--InCallUI/res/values/dimens.xml4
-rw-r--r--InCallUI/res/values/styles.xml9
-rw-r--r--InCallUI/src/com/android/incallui/CallCardFragment.java18
-rw-r--r--InCallUI/src/com/android/incallui/InCallAnimationUtils.java (renamed from InCallUI/src/com/android/incallui/AnimationUtils.java)7
9 files changed, 106 insertions, 82 deletions
diff --git a/InCallUI/res/anim/call_status_pulse.xml b/InCallUI/res/anim/call_status_pulse.xml
new file mode 100644
index 000000000..6bbcb6383
--- /dev/null
+++ b/InCallUI/res/anim/call_status_pulse.xml
@@ -0,0 +1,22 @@
+<?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
+ -->
+<alpha xmlns:android="http://schemas.android.com/apk/res/android"
+ android:fromAlpha="0.8"
+ android:toAlpha="1"
+ android:duration="600"
+ android:repeatCount="infinite"
+ android:repeatMode="reverse" /> \ No newline at end of file
diff --git a/InCallUI/res/layout/call_button_fragment.xml b/InCallUI/res/layout/call_button_fragment.xml
index 315a90e33..8969cbb37 100644
--- a/InCallUI/res/layout/call_button_fragment.xml
+++ b/InCallUI/res/layout/call_button_fragment.xml
@@ -61,7 +61,7 @@
android:paddingStart="@dimen/button_cluster_horizontal_padding"
android:paddingEnd="@dimen/button_cluster_horizontal_padding"
android:background="@color/button_background_color"
- android:gravity="center">
+ android:gravity="bottom|center_horizontal">
<!-- This row has either 4 or 5 buttons, depending on
whether the device supports "Hold" (i.e. 4 buttons on
diff --git a/InCallUI/res/layout/call_card.xml b/InCallUI/res/layout/call_card.xml
index e6f06f38c..658cc493e 100644
--- a/InCallUI/res/layout/call_card.xml
+++ b/InCallUI/res/layout/call_card.xml
@@ -48,6 +48,7 @@
android:orientation="vertical"
android:elevation="@dimen/primary_call_elevation"
android:background="@color/incall_call_banner_background_color"
+ android:paddingTop="@dimen/call_banner_primary_call_container_top_padding"
android:clipChildren="false"
android:clipToPadding="false" >
@@ -62,7 +63,8 @@
<FrameLayout
android:layout_width="match_parent"
- android:layout_height="match_parent" >
+ android:layout_height="0dp"
+ android:layout_weight="1">
<!-- Contact photo for primary call info -->
<ImageView android:id="@+id/photo"
diff --git a/InCallUI/res/layout/primary_call_info.xml b/InCallUI/res/layout/primary_call_info.xml
index bed46dc25..369f70216 100644
--- a/InCallUI/res/layout/primary_call_info.xml
+++ b/InCallUI/res/layout/primary_call_info.xml
@@ -20,61 +20,55 @@
of info about a single call, including the contact name, phone number, call time counter, and
other status info. This info is shown as a "banner" overlaid across the top of contact photo.
-->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/primary_call_banner"
- style="@style/PrimaryCallInfoPrimaryCallBanner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:orientation="vertical"
android:minHeight="@dimen/call_banner_height"
android:paddingStart="@dimen/call_banner_side_padding"
android:paddingEnd="@dimen/call_banner_side_padding"
- android:paddingTop="@dimen/call_banner_primary_call_top_padding"
android:clipChildren="false"
- android:clipToPadding="false" >
+ android:clipToPadding="false"
+ android:animateLayoutChanges="true"
+ android:gravity="center">
+
+ <TextView android:id="@+id/callStateLabel"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textColor="@color/incall_accent_color"
+ android:textSize="@dimen/call_status_text_size"
+ android:singleLine="true"
+ android:gravity="start"
+ android:ellipsize="end" />
<!-- Name (or the phone number, if we don't have a name to display). -->
- <LinearLayout android:id="@+id/stateAndName"
+ <TextView android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical"
- android:layout_centerInParent="true"
- android:animateLayoutChanges="true"
- android:clipChildren="false"
- android:clipToPadding="false" >
+ android:layout_marginTop="-5dp"
+ android:fontFamily="sans-serif-light"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textSize="@dimen/call_name_text_size"
+ android:singleLine="true" />
- <TextView android:id="@+id/callStateLabel"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textSize="@dimen/call_status_text_size"
- android:singleLine="true"
- android:gravity="start"
- android:ellipsize="end" />
- <TextView android:id="@+id/name"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:fontFamily="sans-serif-light"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textSize="@dimen/call_name_text_size"
- android:singleLine="true" />
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:clipChildren="false"
+ android:clipToPadding="false">
- <LinearLayout
- android:layout_width="match_parent"
+ <!-- Label (like "Mobile" or "Work", if present) and phone number, side by side -->
+ <LinearLayout android:id="@+id/labelAndNumber"
+ android:layout_width="0dp"
android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:clipChildren="false"
- android:clipToPadding="false" >
-
- <!-- Label (like "Mobile" or "Work", if present) and phone number, side by side -->
- <LinearLayout android:id="@+id/labelAndNumber"
- android:layout_below="@id/stateAndName"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:orientation="horizontal">
+ android:layout_weight="1"
+ android:orientation="horizontal">
- <TextView android:id="@+id/phoneNumber"
+ <TextView android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
@@ -83,40 +77,38 @@
android:singleLine="true"
android:textDirection="ltr" />
- <TextView android:id="@+id/label"
+ <TextView android:id="@+id/phoneNumber"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_marginStart="6dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/incall_call_banner_subtext_color"
android:textSize="@dimen/call_label_text_size"
- android:singleLine="true"
- android:layout_marginStart="6dp" />
-
- </LinearLayout>
-
- <!-- Elapsed time indication for a call in progress. -->
- <TextView android:id="@+id/elapsedTime"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerVertical="true"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="@color/incall_call_banner_subtext_color"
- android:textSize="@dimen/call_label_text_size"
- android:singleLine="true"
- android:visibility="gone" />
+ android:singleLine="true" />
</LinearLayout>
- <!-- Call type indication: a special label and/or branding
- for certain kinds of calls (like "Internet call" for a SIP call.) -->
- <TextView android:id="@+id/callTypeLabel"
+ <!-- Elapsed time indication for a call in progress. -->
+ <TextView android:id="@+id/elapsedTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_centerVertical="true"
android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="@color/incall_call_banner_text_color"
- android:maxLines="1"
- android:ellipsize="end" />
+ android:textColor="@color/incall_call_banner_subtext_color"
+ android:textSize="@dimen/call_label_text_size"
+ android:singleLine="true"
+ android:visibility="gone" />
</LinearLayout>
-</RelativeLayout> <!-- End of call_banner --> \ No newline at end of file
+ <!-- Call type indication: a special label and/or branding
+ for certain kinds of calls (like "Internet call" for a SIP call.) -->
+ <TextView android:id="@+id/callTypeLabel"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="@color/incall_call_banner_text_color"
+ android:maxLines="1"
+ android:ellipsize="end" />
+
+</LinearLayout> <!-- End of call_banner -->
diff --git a/InCallUI/res/values/colors.xml b/InCallUI/res/values/colors.xml
index e740b8428..e2eeceaea 100644
--- a/InCallUI/res/values/colors.xml
+++ b/InCallUI/res/values/colors.xml
@@ -24,7 +24,7 @@
<!-- Background color of main banner. -->
<color name="incall_call_banner_background_color">@color/incall_background_color</color>
<color name="incall_call_banner_text_color">#ffffff</color>
- <color name="incall_call_banner_subtext_color">#99ffffff</color>
+ <color name="incall_call_banner_subtext_color">#b2ebf2</color>
<color name="incall_banner_secondary_background_color">#f5f5f5</color>
<color name="incall_banner_secondary_text_color">#808080</color>
@@ -81,6 +81,6 @@
<color name="glowpad_incoming_widget_tint">#a3a3a3</color>
<color name="glowpad_incoming_widget_background_tint">#ffffff</color>
- <!-- 15% opacity, accent color. -->
- <color name="incall_dialpad_touch_tint">#26eeff41</color>
+ <!-- 30% opacity, accent color. -->
+ <color name="incall_dialpad_touch_tint">#66eeff41</color>
</resources>
diff --git a/InCallUI/res/values/dimens.xml b/InCallUI/res/values/dimens.xml
index cef0ee5ff..95f110118 100644
--- a/InCallUI/res/values/dimens.xml
+++ b/InCallUI/res/values/dimens.xml
@@ -20,7 +20,7 @@
<!-- Height of the "call banner" overlay on top of the upper part of
the call info area. -->
- <dimen name="call_banner_height">128dp</dimen>
+ <dimen name="call_banner_height">122dp</dimen>
<!-- Margin between the bottom of the "call card" photo
and the top of the in-call button cluster. -->
@@ -31,7 +31,7 @@
<!-- Padding at the right edges of the secondary call banner. -->
<dimen name="secondary_call_banner_right_padding">24dp</dimen>
<!-- Padding at the top and bottom edges of the "call banner". -->
- <dimen name="call_banner_primary_call_top_padding">24dp</dimen>
+ <dimen name="call_banner_primary_call_container_top_padding">16dp</dimen>
<dimen name="call_banner_secondary_call_top_bottom_padding">24dp</dimen>
<!-- Padding at the top and bottom edges of the "provider information" -->
diff --git a/InCallUI/res/values/styles.xml b/InCallUI/res/values/styles.xml
index 7b305ec45..511bae83f 100644
--- a/InCallUI/res/values/styles.xml
+++ b/InCallUI/res/values/styles.xml
@@ -55,7 +55,6 @@
<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/call_button_margin_vertical</item>
- <item name="android:layout_marginTop">@dimen/call_button_margin_vertical</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>
@@ -116,16 +115,14 @@
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">
+ <style name="Theme.InCallScreen" parent="@android:style/Theme.Quantum.Light">
<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>
<item name="dialpad_key_button_touch_tint">@color/incall_dialpad_touch_tint</item>
- </style>
-
- <style name="PrimaryCallInfoPrimaryCallBanner">
- <item name="android:layout_alignParentTop">true</item>
+ <item name="android:textColorPrimary">@color/incall_call_banner_text_color</item>
+ <item name="android:colorPrimaryDark">@color/actionbar_background_color_dark</item>
</style>
</resources>
diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java
index df791bb1a..aec4513e7 100644
--- a/InCallUI/src/com/android/incallui/CallCardFragment.java
+++ b/InCallUI/src/com/android/incallui/CallCardFragment.java
@@ -35,8 +35,8 @@ import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.ViewTreeObserver.OnGlobalLayoutListener;
import android.view.accessibility.AccessibilityEvent;
-import android.view.animation.Interpolator;
-import android.view.animation.PathInterpolator;
+import android.view.animation.Animation;
+import android.view.animation.AnimationUtils;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
@@ -82,6 +82,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
private float mDensity;
private float mTranslationOffset;
+ private Animation mPulseAnimation;
@Override
CallCardPresenter.CallCardUi getUi() {
@@ -124,6 +125,9 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
+ mPulseAnimation =
+ AnimationUtils.loadAnimation(view.getContext(), R.anim.call_status_pulse);
+
mPhoneNumber = (TextView) view.findViewById(R.id.phoneNumber);
mPrimaryName = (TextView) view.findViewById(R.id.name);
mNumberLabel = (TextView) view.findViewById(R.id.label);
@@ -153,6 +157,9 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
}
});
ViewUtil.setupFloatingActionButton(mHandoffButton, getResources());
+
+ mPrimaryName.setElegantTextHeight(false);
+ mCallStateLabel.setElegantTextHeight(false);
}
@Override
@@ -293,7 +300,12 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
if (!TextUtils.isEmpty(callStateLabel)) {
mCallStateLabel.setText(callStateLabel);
mCallStateLabel.setVisibility(View.VISIBLE);
+ if (state != Call.State.CONFERENCED) {
+ mCallStateLabel.startAnimation(mPulseAnimation);
+ }
} else {
+ mCallStateLabel.getAnimation().cancel();
+ mCallStateLabel.setAlpha(0);
mCallStateLabel.setVisibility(View.GONE);
}
@@ -342,7 +354,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
view.setImageDrawable(photo);
AnimUtils.fadeIn(mElapsedTime, AnimUtils.DEFAULT_DURATION);
} else {
- AnimationUtils.startCrossFade(view, current, photo);
+ InCallAnimationUtils.startCrossFade(view, current, photo);
view.setVisibility(View.VISIBLE);
}
}
diff --git a/InCallUI/src/com/android/incallui/AnimationUtils.java b/InCallUI/src/com/android/incallui/InCallAnimationUtils.java
index b5546de14..44bb369e6 100644
--- a/InCallUI/src/com/android/incallui/AnimationUtils.java
+++ b/InCallUI/src/com/android/incallui/InCallAnimationUtils.java
@@ -23,15 +23,14 @@ import android.graphics.Canvas;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable;
-import android.view.View;
import android.view.ViewPropertyAnimator;
import android.widget.ImageView;
/**
* Utilities for Animation.
*/
-public class AnimationUtils {
- private static final String LOG_TAG = AnimationUtils.class.getSimpleName();
+public class InCallAnimationUtils {
+ private static final String LOG_TAG = InCallAnimationUtils.class.getSimpleName();
/**
* Turn on when you're interested in fading animation. Intentionally untied from other debug
* settings.
@@ -44,7 +43,7 @@ public class AnimationUtils {
*/
public static final int ANIMATION_DURATION = 250;
- private AnimationUtils() {
+ private InCallAnimationUtils() {
}
/**