summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
Diffstat (limited to 'InCallUI')
-rw-r--r--InCallUI/res/layout/primary_call_info.xml92
-rw-r--r--InCallUI/src/com/android/incallui/CallCardFragment.java14
2 files changed, 57 insertions, 49 deletions
diff --git a/InCallUI/res/layout/primary_call_info.xml b/InCallUI/res/layout/primary_call_info.xml
index ed0ae54ad..cd1bcd63d 100644
--- a/InCallUI/res/layout/primary_call_info.xml
+++ b/InCallUI/res/layout/primary_call_info.xml
@@ -114,7 +114,7 @@
</RelativeLayout> <!-- End of call_banner -->
- <LinearLayout android:id="@+id/supplementary_info_container"
+ <FrameLayout android:id="@+id/supplementary_info_container"
style="@style/PrimaryCallInfoSupplementaryInfoContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -123,49 +123,59 @@
android:background="@color/incall_secondary_info_background"
android:animateLayoutChanges="true">
- <TextView android:id="@+id/callServiceLabel"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingTop="@dimen/provider_info_top_bottom_padding"
- android:paddingBottom="@dimen/provider_info_top_bottom_padding"
- android:paddingStart="@dimen/call_banner_side_padding"
- android:paddingEnd="@dimen/call_banner_side_padding"
- android:gravity="start|center_vertical"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="@color/incall_call_banner_text_color"
- android:background="@android:color/transparent"
- android:singleLine="true"
- android:ellipsize="end" />
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="start|center_vertical"
+ android:gravity="center_vertical"
+ android:paddingTop="@dimen/provider_info_top_bottom_padding"
+ android:paddingBottom="@dimen/provider_info_top_bottom_padding"
+ android:paddingStart="@dimen/call_banner_side_padding"
+ android:paddingEnd="@dimen/call_banner_side_padding">
+ <ImageView android:id="@+id/callServiceIcon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"/>
+ <TextView android:id="@+id/callServiceLabel"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingStart="5dp"
+ android:gravity="center"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="@color/incall_call_banner_text_color"
+ android:singleLine="true"
+ android:ellipsize="end" />
+ </LinearLayout>
- <View android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_weight="1" />
+ <LinearLayout
+ android:layout_gravity="end|center_vertical"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content">
+
+ <!-- The "call state label": In some states, this shows a special
+ indication like "Dialing" or "Incoming call" or "Call ended".
+ It's unused for the normal case of an active ongoing call. -->
+ <TextView android:id="@+id/callStateLabel"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingTop="@dimen/provider_info_top_bottom_padding"
+ android:paddingBottom="@dimen/provider_info_top_bottom_padding"
+ android:paddingStart="@dimen/call_banner_side_padding"
+ android:paddingEnd="@dimen/call_banner_side_padding"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="@color/incall_call_banner_text_color"
+ android:textAllCaps="true"
+ android:singleLine="true"
+ android:ellipsize="end" />
+
+ <Button android:id="@+id/connectionHandoffButton"
+ android:text="@string/connection_handoff_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:visibility="gone" />
- <!-- The "call state label": In some states, this shows a special
- indication like "Dialing" or "Incoming call" or "Call ended".
- It's unused for the normal case of an active ongoing call. -->
- <TextView android:id="@+id/callStateLabel"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingTop="@dimen/provider_info_top_bottom_padding"
- android:paddingBottom="@dimen/provider_info_top_bottom_padding"
- android:paddingStart="@dimen/call_banner_side_padding"
- android:paddingEnd="@dimen/call_banner_side_padding"
- android:gravity="end|center_vertical"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="@color/incall_call_banner_text_color"
- android:textAllCaps="true"
- android:background="@android:color/transparent"
- android:singleLine="true"
- android:ellipsize="end" />
+ </LinearLayout>
- <Button android:id="@+id/connectionHandoffButton"
- android:gravity="end|center_vertical"
- android:text="@string/connection_handoff_text"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:visibility="gone" />
- </LinearLayout>
+ </FrameLayout>
</LinearLayout>
diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java
index 090820c47..5253ba664 100644
--- a/InCallUI/src/com/android/incallui/CallCardFragment.java
+++ b/InCallUI/src/com/android/incallui/CallCardFragment.java
@@ -18,8 +18,6 @@ package com.android.incallui;
import android.animation.LayoutTransition;
import android.content.Context;
-import android.graphics.Bitmap;
-import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.telephony.DisconnectCause;
@@ -48,6 +46,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
private TextView mNumberLabel;
private TextView mPrimaryName;
private TextView mCallServiceLabel;
+ private ImageView mCallServiceIcon;
private TextView mCallStateLabel;
private TextView mCallTypeLabel;
private ImageView mPhoto;
@@ -109,6 +108,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
mSecondaryCallInfo = (ViewStub) view.findViewById(R.id.secondary_call_info);
mPhoto = (ImageView) view.findViewById(R.id.photo);
mCallServiceLabel = (TextView) view.findViewById(R.id.callServiceLabel);
+ mCallServiceIcon = (ImageView) view.findViewById(R.id.callServiceIcon);
mCallStateLabel = (TextView) view.findViewById(R.id.callStateLabel);
mCallTypeLabel = (TextView) view.findViewById(R.id.callTypeLabel);
mElapsedTime = (TextView) view.findViewById(R.id.elapsedTime);
@@ -300,17 +300,15 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
if (!TextUtils.isEmpty(text)) {
mCallServiceLabel.setText(text);
if (isWiFi) {
- mCallServiceLabel.setCompoundDrawablesRelativeWithIntrinsicBounds(
- R.drawable.ic_in_call_wifi, 0, 0, 0);
- mCallServiceLabel.setCompoundDrawablePadding(5);
- mCallServiceLabel.setCompoundDrawablePadding((int) (mDensity * 5));
+ mCallServiceIcon.setImageResource(R.drawable.ic_in_call_wifi);
+ mCallServiceIcon.setVisibility(View.VISIBLE);
} else {
- mCallServiceLabel.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
+ mCallServiceIcon.setVisibility(View.GONE);
}
mCallServiceLabel.setVisibility(View.VISIBLE);
} else {
mCallServiceLabel.setText("");
- mCallServiceLabel.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
+ mCallServiceIcon.setVisibility(View.GONE);
mCallServiceLabel.setVisibility(View.GONE);
}
}