If a notification is updated to be non clearable but is in the middle of
being dismissed then it is snapped back into place. Part of the ways to
check if it was being dismissed is by checking the translation of the
notification.
In the case that the notification was translated to display the gear, then
when it was updated it would be snapped back over the gear. This CL fixes
this issue by snapping back to the gear instead of 0 in this situation.
Bug: 28019486
Change-Id: Ic6c4c29b0adee15d7b358fcdbc8446e8a4cd9f82
Shouldn't animate the whole view, use the translatable views so that
they get clipped on tablet / landscape.
Additionally this changes the behavior in the case where the gear
might be showing, previously that would hide prior to the dismiss
all animation, UX prefers this to just have the notification cover
the gear and slide away or the gear fade away depending on the side
it's showing.
Bug: 28006639
Change-Id: I43027cb29410496de5b6e09c4a0c57a69484295c
An accelerated interpolator is used for dismissing when the
the velocity = 0 which can occur with dismiss all or if the
noti is swiped far enough but not fast enough.
There is no duration specified when the noti is swiped far
enough, and the velocity passed in is 0 so the default
duration is used without taking into account the velocity.
This CL alters the code to pass in the velocity so that a
duration is calculated.
Bug: 27864379
Change-Id: Ifac04bb8d1b714c040102fef035d55737c844157
The clause used there was using a reused value of a motion event
and therefore not trigger, even if it should have.
Also added a clause which this was actually used for to remove
the long press callback when using the inline settings slider.
Bug: 27352426
Change-Id: I9c432eeb354d7d5e72b375cfc5ead9e04a4e6c81
When a notification is being removed by swiping action,
actual removing will be performed after the swiping animation ends.
And also, it is same when removing notifications with <Clear all> button.
The actual removing will be performed after collapsing of status bar.
But before actual removing, the notification flags can be updated
to not clearable, and then the notification view can be remain
out of display by X-translation animation.
Therefore, fix to snap the notification view back when updating
if it is not clearable and need to be come back.
Change-Id: I005a9a8ac82bb513a47b5b8afc430bbe4880b52e
This reverts commit 88eca2aa0e.
It additionally fixes an issue with notification scrolling after gear is displayed
by indicating that the user is no longer swiping by calling onDragCancelled
Change-Id: Ieba0cea35bba9c383d8b5fdca08cb5ff083666c3
Addressing comment in ag/877913 PS6
Adds FlingAnimationUtils to SwipeHelper for dismissing notification
so that it may better follow a user's finger. This is not used
when a dismiss all is called (i.e. useAcceleration is requested).
Additionally alters dismiss behavior to accelerate out if velocity
was 0.
Change-Id: Ia7dc15d64e8427d5cfbdee3f4e48ccd60f5b0b36
If the gesture on the notification was not considered a dismiss gesture
the code always check if the notification had moved enough to display
the gear.
This causes some undesirable behavior:
- For unclearable notifications the gear would *always* be shown
- Even if the velocity of the gesture was enough to be a dismiss it
may have failed other requirements and then the gear would be
shown
This CL alters NotificationSwipeHelper to take into account the
velocity of the gesture, and if it was great enough to be a dismiss
but wasn't (unclearable, didn't meet other requirements) it'll just
snap the notification back into place.
Additionally this CL alters the behavior so that if the gear is
visible and the notification is swiped in the direction of the gear
it *won't* dismiss the notification but rather cover the gear. If
a dismiss gesture is made in the opposite direction of the gear, the
notification will still be dismissed.
Bug: 27378399
Bug: 27319053
Bug: 27335353
Change-Id: I0849eecc71f2c6722e811d284534c2ea29b1b8aa
Currently you can swipe / translate inline controls, this
should not be possible. This CL fixes that.
Bug: 22451710
Change-Id: I3e048dce7df6d44ce80ee79bd449973bde0bc222
- Added a view to display / control the gear behind the noti
- Updated SwipeHelper to hide / show the gear based on the gesture
- Only one notification or notification group can show the gear
at a time
Couple of things left to do that will come in a follow up CL:
- Animation (to / from inline controls, fading gear based on movement)
- For children in a group there needs to be a grey background
Bug: 22451710
Change-Id: I2f93edf48109a82bab0839c73cbaba1535caee9a
Make sure to only enter dismiss mode if xDiff is bigger than yDiff,
and only start scrolling if yDiff is bigger than xDiff.
Change-Id: Id898752ff7a08df549e234678aed0dad074b202d
Previously many objects parsed their own interpolators leading
to memory and computational overhead.
This is now unified into a single Static class.
Change-Id: I0537aca0e6dad10a7ffd52ba64b7356b0c5e4672
- Introduces notion of ignored tasks for the purposes of layout in
TaskStackView. This can be used during drag and drop, and while
dismissing to calculate the state of the stack without the task that
the user is currently interacting with.
- Fixing minor layout issue when the front/back task transforms are
improperly calculated when there is a single task
- Fixing minor issue when the anchor task is calculated incorrectly when
dismissing task views
Change-Id: I1eb0864a52e53562e4d573a6ed4f8a5a1615aff9
- Removing calls to ensureCapacity, which was causing reallocations when
using a temporary set with multiple uses.
- Fixing issue with update callback not being called when immediately
updating a TaskView’s transform
- Adding utility methods in preparation for refactoring code
Change-Id: If62c3751ed6af15092a34435df08bb4d627536ea
Note: the guts are still trucated to the height of the notification.
The slider initially shows the importance of the individual notification,
but changing the slider changes the importance for the whole group
of notifications.
Bug: 22451710
Change-Id: Id6de3aaace2bdb88a8cc5db517002dc7f0e349ae
Newly enforcing a threshold for the following cases:
Unlocking, Dismissing Notifications, Swiping Down Quick settings.
Also increased the affordance threshold slightly.
Bug: 15433087
Change-Id: I723346dedf9ae0e3f8b103182992ab572fc394b9
When longpressing a notification, instead of popping up a
menu we now replace the notification's view with an
inspector showing the app name and icon inline, along with a
proper app info button.
Bug: 15892646
Change-Id: I905e2fd5c9ea5cbbaccabd633f4b8257227a10bc
A new text button is added to the bottom of the notification list
enabling the user to clear all notifications.
Bug: 14826666
Change-Id: I34dcccb59346798cca321bc1a19252b00e7c5689
Adds gradient, fixes wrong padding on tablets
and adds a callback mode to swipe helper.
Bug: 15106201
Change-Id: I9c3f2d24665cb3de8e70904893f56c928b0caabb
Animations are now only triggered when absolutely needed.
In addition, the notifications are now not clipped anymore when starting
a drag on them and the notification below the dragged one is fadded in if
necessary.
Change-Id: I80e8b3ea8fb48505edfb3cace6176dfa00c5a659
...even though I don't long press
When you start scrolling from a point between two notification
items, only the first down goes to SwipeHelper.onInterceptTouchEvent(),
and the following events go to SwipeHelper.onTouchEvent(). However
when we call SwipeHelper.onTouchEvent(), we immediately bail if we are
not in the drag state, so we never clear the pending long press event.
Bug: 6706369
Change-Id: Icc46fba62fe7ee334d8d62ac39195d7c3aeff705
Also be sure to cancel the longpress listeners when things
change.
Finally, increase the longpress timeout to 1.5x normal
longpress.
Bug: 6441520
Change-Id: Icea4d2a5c98a9a51a15f0762454de9e5cd454c50
When you swipe to dismiss a recent item on a
tablet, fade the item to 0 alpha
Also, create common interface for Recents-specific
methods for Recents[Horizontal/Vertical]ScrollView
Bug: 5953654
Change-Id: I0a72b49b3cfae0607b42dbf8f6d4da9898d7e491
Improving load time by:
- using window animation for fade-in and not
waiting to create HW layer
- starting loading of thumbnails/icons earlier
- only initially creating views for the first
screenful of items
- recycling views
Change-Id: I529b1085fe35d81aaafeb7433ccaed8e0537f01c
Making the notfication delete-all animation smoother by carefully
choreographing the various parts of it. The problem with the previous
animation was that there was simply too much going on at the
same time, causing things like layout and recreating display-lists
in the middle of animations that became choppy as a result. This
approach swipes all items off quickly, then scrolls the shade up to the
top, making both sets of animations smoother as a result.
Fixes#5431207: Notification delete-all should be smoother
Change-Id: Iefe8ab5d661e05adcd10379dab85227d17904450
- Making thumbnails invisible until loaded (fixes regression)
- Speed up dismiss animation from menu
- Make the max swipe velocity greater
- Make only the thumbnail and app title long-clickable
- No more click sound when tapping outside the thumbnails to dismiss Recents
- Tweaking color of recents app label text
Change-Id: If7b6cd59e92feb0472eb3ea266733549cb9f4d4b
Bug: 5198231
Widgets always need to handle ACTION_CANCEL properly since
it can happen at any time, such as when the screen is turned
off or the screen is rotated, removed or reconfigured.
Change-Id: Ia30b14bb6f68cdde5286b4d72e69130e9fb38732