diff options
author | calderwoodra <calderwoodra@google.com> | 2017-10-09 16:59:04 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-10-10 07:13:45 -0700 |
commit | 6007f5208514c4f69ca6fa75507abba92ef5372d (patch) | |
tree | de82c4575349ebd7c211ace9785cf51100c1723a /java/com/android/dialer/app/list/ListsFragment.java | |
parent | 19e6dbd30ae88e68cd68f3d3873440d50d19d902 (diff) |
Improved FAB UX.
One of the biggest issues with the FAB is that it doesn't
scale in/out properly. It looked more like setVisibility was
being called instead. This CL migrates the FAB controller to
use the built in scale in/out methods #show and #hide and the
animation is much nicer.
Some of the other issues were:
- Now scaling animation is correct and visible.
- No longer flashes when going in/out of search.
- No longer shows on top of the return to call controller.
- No longer bugs when switching between VVM TOS and contacts.
- No longer shows FAB over VVM TOS when entering/exiting search
Bug: 62588192,35359563,64116334,27458212,37991480,67419607
Test: manual
PiperOrigin-RevId: 171608105
Change-Id: I9b3f61df35abf3659a432adf411b1b7d20eba683
Diffstat (limited to 'java/com/android/dialer/app/list/ListsFragment.java')
-rw-r--r-- | java/com/android/dialer/app/list/ListsFragment.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/java/com/android/dialer/app/list/ListsFragment.java b/java/com/android/dialer/app/list/ListsFragment.java index a94f9c137..362997a5a 100644 --- a/java/com/android/dialer/app/list/ListsFragment.java +++ b/java/com/android/dialer/app/list/ListsFragment.java @@ -35,6 +35,7 @@ import com.android.contacts.common.list.ViewPagerTabs; import com.android.dialer.app.R; import com.android.dialer.app.calllog.CallLogFragment; import com.android.dialer.app.calllog.CallLogNotificationsService; +import com.android.dialer.app.calllog.VisualVoicemailCallLogFragment; import com.android.dialer.app.voicemail.error.VoicemailStatusCorruptionHandler; import com.android.dialer.app.voicemail.error.VoicemailStatusCorruptionHandler.Source; import com.android.dialer.common.LogUtil; @@ -409,6 +410,16 @@ public class ListsFragment extends Fragment implements OnPageChangeListener, Lis return mTabIndex; } + public boolean shouldShowFab() { + // If the VVM TOS is visible, don't show the fab + if (mCurrentPage instanceof VisualVoicemailCallLogFragment + && ((VisualVoicemailCallLogFragment) mCurrentPage).isModalAlertVisible()) { + return false; + } + + return true; + } + /** * External method to update unread count because the unread count changes when the user expands a * voicemail in the call log or when the user expands an unread call in the call history tab. |