diff options
author | Rohit Yengisetty <rohit@cyngn.com> | 2016-05-10 15:01:13 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-05-10 17:12:14 -0700 |
commit | 9d93c75ba103247e69e4df2666126125952a7b70 (patch) | |
tree | a58fd2b4517dcbac4b57cad6ad624531407e3a91 /src/com/android/incallui/CallCardFragment.java | |
parent | fc285dd23bcba423fb1f8ec823f395974e322f96 (diff) | |
download | packages_apps_InCallUI-9d93c75ba103247e69e4df2666126125952a7b70.tar.gz packages_apps_InCallUI-9d93c75ba103247e69e4df2666126125952a7b70.tar.bz2 packages_apps_InCallUI-9d93c75ba103247e69e4df2666126125952a7b70.zip |
Fix glitches in the rendering of contact-info Provider's logo
There are instances where the size of the drawable abruptly changes
while navigating into and out of InCallActivity. This resizing leads
to the login being partically drawn or clipped. Eliminating this
inconsistency by moving the logo drawable into an ImageView.
Change-Id: Icdcc3100ac9e28cfd5749d04ca935fbea396bbd2
Diffstat (limited to 'src/com/android/incallui/CallCardFragment.java')
-rw-r--r-- | src/com/android/incallui/CallCardFragment.java | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/com/android/incallui/CallCardFragment.java b/src/com/android/incallui/CallCardFragment.java index c64f200b..b24bf427 100644 --- a/src/com/android/incallui/CallCardFragment.java +++ b/src/com/android/incallui/CallCardFragment.java @@ -149,7 +149,8 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr private View mPhotoContainer; private TextView mLookupStatusMessage; - private TextView mContactInfoAttribution; + private TextView mContactInfoAttributionText; + private ImageView mContactInfoAttributionLogo; private TextView mSpamInfoView; // Dark number info bar @@ -333,7 +334,8 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr mCallSubject = (TextView) view.findViewById(R.id.callSubject); mLookupStatusMessage = (TextView) view.findViewById(R.id.lookupStatusMessage); - mContactInfoAttribution = (TextView) view.findViewById(R.id.contactInfoAttribution); + mContactInfoAttributionText = (TextView) view.findViewById(R.id.contactInfoAttributionText); + mContactInfoAttributionLogo = (ImageView) view.findViewById(R.id.contactInfoAttributionLogo); mSpamInfoView = (TextView) view.findViewById(R.id.spamInfo); mPhotoContainer = view.findViewById(R.id.call_card_content); @@ -1331,13 +1333,9 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr } else { switch (lookupStatus) { case SUCCESS: - mContactInfoAttribution.setText( + mContactInfoAttributionText.setText( res.getString(R.string.powered_by_provider, providerName)); - int logoSize = res.getDimensionPixelSize(R.dimen.contact_info_attribution_logo_size); - int logoPadding = res.getDimensionPixelSize(R.dimen.contact_info_attribution_logo_padding); - providerLogo.setBounds(0, 0, logoSize, logoSize); - mContactInfoAttribution.setCompoundDrawablesRelative(providerLogo, null, null, null); - mContactInfoAttribution.setCompoundDrawablePadding(logoPadding); + mContactInfoAttributionLogo.setImageDrawable(providerLogo); showContactAttribution = true; showLookupStatus = false; break; @@ -1365,7 +1363,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr } } mLookupStatusMessage.setVisibility(showLookupStatus ? View.VISIBLE : View.GONE); - mContactInfoAttribution.setVisibility(showContactAttribution ? View.VISIBLE : View.GONE); + mContactInfoAttributionText.setVisibility(showContactAttribution ? View.VISIBLE : View.GONE); } public void onDialpadVisibilityChange(boolean isShown) { |