summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2014-05-20 17:25:34 -0700
committerAndrew Lee <anwlee@google.com>2014-05-21 10:16:26 -0700
commit9be20297eaa14ef2987d39bd4283eef8a3230543 (patch)
tree333263d64105ff4c345ffdfab2cc18d1f8d60437 /InCallUI
parent594e1487c309aa1654fb749ac047af23c011cc67 (diff)
Adjust dimensions of InCallUI styling.
Also, toggle visibility of the number and label container depending on if there is no number and label. Change-Id: I22e132b0fd3c201dfe68098c3e284c119080bb16
Diffstat (limited to 'InCallUI')
-rw-r--r--InCallUI/res/layout/primary_call_info.xml2
-rw-r--r--InCallUI/res/values/dimens.xml10
-rw-r--r--InCallUI/res/values/styles.xml2
-rw-r--r--InCallUI/src/com/android/incallui/CallCardFragment.java10
4 files changed, 15 insertions, 9 deletions
diff --git a/InCallUI/res/layout/primary_call_info.xml b/InCallUI/res/layout/primary_call_info.xml
index 4b19c4889..bed46dc25 100644
--- a/InCallUI/res/layout/primary_call_info.xml
+++ b/InCallUI/res/layout/primary_call_info.xml
@@ -29,7 +29,6 @@
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:clipChildren="false"
android:clipToPadding="false" >
@@ -102,6 +101,7 @@
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" />
diff --git a/InCallUI/res/values/dimens.xml b/InCallUI/res/values/dimens.xml
index 24858c2af..e34aca8da 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">148dp</dimen>
+ <dimen name="call_banner_height">128dp</dimen>
<!-- Margin between the bottom of the "call card" photo
and the top of the in-call button cluster. -->
@@ -31,8 +31,8 @@
<!-- 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">16dp</dimen>
- <dimen name="call_banner_top_bottom_padding">16dp</dimen>
+ <dimen name="call_banner_primary_call_top_padding">24dp</dimen>
+ <dimen name="call_banner_top_bottom_padding">8dp</dimen>
<!-- Padding at the top and bottom edges of the "provider information" -->
<dimen name="provider_info_top_bottom_padding">8dp</dimen>
@@ -66,8 +66,8 @@
holding the phone, *before* moving it up to your face and having
the prox sensor kick in.) -->
<dimen name="button_cluster_horizontal_padding">20dp</dimen>
- <dimen name="call_button_margin_vertical">4dp</dimen>
- <dimen name="call_button_margin_horizontal">2dp</dimen>
+ <dimen name="call_button_margin_vertical">8dp</dimen>
+ <dimen name="call_button_margin_horizontal">6dp</dimen>
<!-- Dimensions for OTA Call Card -->
<dimen name="otaactivate_layout_marginTop">10dp</dimen>
diff --git a/InCallUI/res/values/styles.xml b/InCallUI/res/values/styles.xml
index d86ff68fc..a910763dc 100644
--- a/InCallUI/res/values/styles.xml
+++ b/InCallUI/res/values/styles.xml
@@ -54,8 +54,8 @@
<style name="InCallButton">
<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_marginTop">@dimen/call_button_margin_vertical</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>
diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java
index 0c60fd555..23ef8e0fb 100644
--- a/InCallUI/src/com/android/incallui/CallCardFragment.java
+++ b/InCallUI/src/com/android/incallui/CallCardFragment.java
@@ -229,11 +229,17 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
nameIsNumber = false;
}
- setPrimaryPhoneNumber(number);
-
// set the name field.
setPrimaryName(name, nameIsNumber);
+ if (TextUtils.isEmpty(number) && TextUtils.isEmpty(label)) {
+ mCallNumberAndLabel.setVisibility(View.GONE);
+ } else {
+ mCallNumberAndLabel.setVisibility(View.VISIBLE);
+ }
+
+ setPrimaryPhoneNumber(number);
+
// Set the label (Mobile, Work, etc)
setPrimaryLabel(label);