PullToRefreshRotateGizmo Class |
Implementation of PullToRefreshGizmo that uses a rotating image to show the pull progress.
The image is rotated by the amount of distance traveled by the click/finger.
When enough pulling distance is covered (more exactly, the one between _StartingPoint and _EndingPoint) the gizmo enters the "ready to refresh" state,
the rotation amount applied is damped by _ExcessPullRotationDamping (i.e. a value of 1f won't apply any furter rotation,
while a value of 0f will apply the same amount of rotation per distance traveled by the click/finger as before the "ready to refresh" state).
When OnRefreshed(Boolean) is called with true, the gizmo will disappear; if it'll be called with false,
it'll start auto-rotating with a speed of _AutoRotationDegreesPerSec degrees per second, until IsShown is set to false.
This last use-case is very common for when the refresh event actually takes time (i.e. retrieving items from a server).
Namespace: frame8.ScrollRectItemsAdapter.Util.PullToRefresh
public class PullToRefreshRotateGizmo : PullToRefreshGizmo
The PullToRefreshRotateGizmo type exposes the following members.
| Name | Description | |
|---|---|---|
| PullToRefreshRotateGizmo |
| Name | Description | |
|---|---|---|
| IsShown | Calls base implementation + resets the rotation to default each time is assigned, regardless if true or false (Overrides PullToRefreshGizmoIsShown.) |
| Name | Description | |
|---|---|---|
| Awake | (Overrides PullToRefreshGizmoAwake.) | |
| OnPull | (Overrides PullToRefreshGizmoOnPull(Single).) | |
| OnRefreshCancelled | (Overrides PullToRefreshGizmoOnRefreshCancelled.) | |
| OnRefreshed | (Overrides PullToRefreshGizmoOnRefreshed(Boolean).) |