diff options
| author | Rohit Yengisetty <rohit@cyngn.com> | 2016-05-19 10:55:58 -0700 |
|---|---|---|
| committer | LorDClockaN <lordclockan@gmail.com> | 2016-05-19 20:34:31 +0200 |
| commit | bd76bbbac91e34499ae4293ef6e5ae7c93abde4b (patch) | |
| tree | 678897efc04b169d1c618ab45ca62b9e49e33511 | |
| parent | bbed2e9c4821f1ac2fd75a46e20f9f9c86bc4f10 (diff) | |
Fix the extra-info container's overlap with dialpad
We now toggle the elevation of the extra-info container based on
the visiblity of the Dialpad fragment. The container's properties
have also been modified to adhere to the project's redlines.
Issue-Id: OPO-723
Change-Id: If2a4cf52f2eacb2930e3cf8aaaa1a2d93cf144ca
| -rw-r--r-- | res/layout/call_card_fragment.xml | 2 | ||||
| -rw-r--r-- | src/com/android/incallui/CallCardFragment.java | 14 |
2 files changed, 10 insertions, 6 deletions
diff --git a/res/layout/call_card_fragment.xml b/res/layout/call_card_fragment.xml index 838120c9..9988176a 100644 --- a/res/layout/call_card_fragment.xml +++ b/res/layout/call_card_fragment.xml @@ -202,6 +202,7 @@ </FrameLayout> <FrameLayout + android:id="@+id/lookup_extra_info_container" android:layout_height="match_parent" android:layout_width="match_parent" android:layout_below="@id/primary_call_info_container" @@ -226,7 +227,6 @@ android:scaleType="centerCrop" android:layout_height="@dimen/contact_info_attribution_logo_size" android:layout_width="@dimen/contact_info_attribution_logo_size" - android:layout_marginStart="@dimen/contact_info_attribution_logo_padding" android:layout_marginEnd="@dimen/contact_info_attribution_logo_padding" /> <TextView diff --git a/src/com/android/incallui/CallCardFragment.java b/src/com/android/incallui/CallCardFragment.java index e88791c2..e7de8b35 100644 --- a/src/com/android/incallui/CallCardFragment.java +++ b/src/com/android/incallui/CallCardFragment.java @@ -148,6 +148,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr private View mManageConferenceCallButton; private View mPhotoContainer; + private View mLookupExtraInfoContainer; private TextView mLookupStatusMessage; private TextView mContactInfoAttributionText; private ImageView mContactInfoAttributionLogo; @@ -333,6 +334,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr mCallStateLabel.setElegantTextHeight(false); mCallSubject = (TextView) view.findViewById(R.id.callSubject); + mLookupExtraInfoContainer = view.findViewById(R.id.lookup_extra_info_container); mLookupStatusMessage = (TextView) view.findViewById(R.id.lookupStatusMessage); mContactInfoAttributionText = (TextView) view.findViewById(R.id.contactInfoAttributionText); mContactInfoAttributionLogo = (ImageView) view.findViewById(R.id.contactInfoAttributionLogo); @@ -607,11 +609,6 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr setLookupProviderStatus(isLookupInProgress, lookupStatus, providerName, providerLogo, showSpamInfo, spamCount); - if (showSpamInfo) { - mPhoto.setVisibility(View.GONE); - mPhotoContainer.setBackgroundColor(getContext().getResources().getColor( - R.color.contact_info_spam_info_text_color, getContext().getTheme())); - } } @Override @@ -1370,6 +1367,13 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr public void onDialpadVisibilityChange(boolean isShown) { mIsDialpadShowing = isShown; updateFabPosition(); + // ensure that the extra-info container doesn't overlap w/ the dialpad + if (isShown) { + mLookupExtraInfoContainer.setElevation(0f); + } else { + mLookupExtraInfoContainer.setElevation(getContext().getResources() + .getDimensionPixelSize(R.dimen.lookup_extra_info_container_elevation)); + } } public void updateFabPosition() { |
