diff options
author | Andrew Lee <anwlee@google.com> | 2014-08-28 12:34:20 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2014-08-28 13:48:46 -0700 |
commit | 3d9fee0f19aa6ee39db04a69b564b9a9d0398825 (patch) | |
tree | 120a942ccfff44b41b97209e9cba89cf8409709e | |
parent | 1d6df0c18333152f2601583e18b1893467f41b14 (diff) |
Add conference call icon to secondary call info.
Bug: 17304107
Change-Id: Icdc1de17f00d9b373c619675566de9d455c10066
-rw-r--r-- | InCallUI/res/layout/manage_conference_call_button.xml | 4 | ||||
-rw-r--r-- | InCallUI/res/layout/secondary_call_info.xml | 13 | ||||
-rw-r--r-- | InCallUI/src/com/android/incallui/CallCardFragment.java | 14 |
3 files changed, 26 insertions, 5 deletions
diff --git a/InCallUI/res/layout/manage_conference_call_button.xml b/InCallUI/res/layout/manage_conference_call_button.xml index 375f88827..13d8fca58 100644 --- a/InCallUI/res/layout/manage_conference_call_button.xml +++ b/InCallUI/res/layout/manage_conference_call_button.xml @@ -38,12 +38,12 @@ android:layout_height="wrap_content" android:src="@drawable/ic_group_white_24dp" android:tint="@color/incall_banner_secondary_text_color" - android:contentDescription="@string/onscreenManageConferenceText" /> + android:contentDescription="@string/onscreenManageConferenceText" + android:paddingEnd="16dp" /> <TextView android:id="@+id/manageConferenceButtonLabel" android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingStart="24dp" android:gravity="center_vertical" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="@color/incall_banner_secondary_text_color" diff --git a/InCallUI/res/layout/secondary_call_info.xml b/InCallUI/res/layout/secondary_call_info.xml index 8106dff0b..46d7316c1 100644 --- a/InCallUI/res/layout/secondary_call_info.xml +++ b/InCallUI/res/layout/secondary_call_info.xml @@ -36,11 +36,19 @@ android:paddingBottom="@dimen/call_banner_secondary_call_top_bottom_padding" android:background="?android:attr/selectableItemBackground"> + <ImageView android:id="@+id/secondaryCallConferenceCallIcon" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@drawable/ic_group_white_24dp" + android:tint="@color/incall_banner_secondary_text_color" + android:paddingEnd="16dp"/> + <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:orientation="vertical"> + <!-- Name (or the phone number, if we don't have a name to display). --> <TextView android:id="@+id/secondaryCallName" android:layout_width="match_parent" @@ -49,18 +57,21 @@ android:textColor="@color/incall_banner_secondary_text_color" android:ellipsize="marquee" android:singleLine="true"/> + <!-- Provider, e.g. AT&T, that a call is associated with --> <LinearLayout android:id="@+id/secondary_call_provider_info" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:visibility="gone" > + <ImageView android:id="@+id/secondaryCallProviderIcon" android:layout_width="@dimen/call_provider_small_icon_size" android:layout_height="@dimen/call_provider_small_icon_size" android:layout_marginRight="2dp" android:baselineAlignBottom="true" android:scaleType="centerInside" /> + <TextView android:id="@+id/secondaryCallProviderLabel" android:layout_width="match_parent" android:layout_height="wrap_content" @@ -68,7 +79,9 @@ android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="@color/incall_banner_secondary_text_color" android:singleLine="true"/> + </LinearLayout> + </LinearLayout> <!-- Call status of the background call, usually the string "On hold". --> diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java index bff48b448..0c0cc5ee2 100644 --- a/InCallUI/src/com/android/incallui/CallCardFragment.java +++ b/InCallUI/src/com/android/incallui/CallCardFragment.java @@ -88,6 +88,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr private View mSecondaryCallProviderInfo; private TextView mSecondaryCallProviderLabel; private ImageView mSecondaryCallProviderIcon; + private View mSecondaryCallConferenceCallIcon; private View mProgressSpinner; private View mManageConferenceCallButton; @@ -463,14 +464,17 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr } if (show) { + boolean hasProvider = !TextUtils.isEmpty(providerLabel); + showAndInitializeSecondaryCallInfo(hasProvider); + if (isConference) { name = getConferenceString(isGeneric); nameIsNumber = false; + mSecondaryCallConferenceCallIcon.setVisibility(View.VISIBLE); + } else { + mSecondaryCallConferenceCallIcon.setVisibility(View.GONE); } - boolean hasProvider = !TextUtils.isEmpty(providerLabel); - showAndInitializeSecondaryCallInfo(hasProvider); - mSecondaryCallName.setText(name); if (hasProvider) { mSecondaryCallProviderLabel.setText(providerLabel); @@ -485,6 +489,8 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr } else { mSecondaryCallInfo.setVisibility(View.GONE); } + + } @Override @@ -788,6 +794,8 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr // until mSecondaryCallInfo is inflated in the call above. if (mSecondaryCallName == null) { mSecondaryCallName = (TextView) getView().findViewById(R.id.secondaryCallName); + mSecondaryCallConferenceCallIcon = + getView().findViewById(R.id.secondaryCallConferenceCallIcon); if (hasProvider) { mSecondaryCallProviderInfo.setVisibility(View.VISIBLE); mSecondaryCallProviderLabel = (TextView) getView() |