Class SfPullToRefresh
A refresh control that allows you to interact and refresh the view loaded in it. The SfPullToRefresh control allows you to refresh the view upon performing the pull to refresh action.
Inheritance
Namespace: Syncfusion.SfPullToRefresh
Assembly: Syncfusion.SfPullToRefresh.Android.dll
Syntax
public class SfPullToRefresh : FrameLayout
Constructors
SfPullToRefresh(Context)
Initializes a new instance of SfPullToRefresh class.
Declaration
public SfPullToRefresh(Context context)
Parameters
| Type | Name | Description |
|---|---|---|
| Android.Content.Context | context | The Android.Content.Context. |
SfPullToRefresh(Context, IAttributeSet)
Initializes a new instance of the SfPullToRefresh class.
Declaration
public SfPullToRefresh(Context context, IAttributeSet attributeSet)
Parameters
| Type | Name | Description |
|---|---|---|
| Android.Content.Context | context | The Android.Content.Context. |
| Android.Util.IAttributeSet | attributeSet | The Android.Util.IAttributeSet. |
SfPullToRefresh(Context, IAttributeSet, Int32)
Initializes a new instance of the SfPullToRefresh class.
Declaration
public SfPullToRefresh(Context context, IAttributeSet attributeSet, int definedStyle)
Parameters
| Type | Name | Description |
|---|---|---|
| Android.Content.Context | context | The Android.Content.Context. |
| Android.Util.IAttributeSet | attributeSet | The Android.Util.IAttributeSet. |
| System.Int32 | definedStyle | The value indicating the defined style. |
SfPullToRefresh(Context, IAttributeSet, Int32, Int32)
Initializes a new instance of the SfPullToRefresh class.
Declaration
public SfPullToRefresh(Context context, IAttributeSet attributeSet, int definedStyle, int definedResource)
Parameters
| Type | Name | Description |
|---|---|---|
| Android.Content.Context | context | The Android.Content.Context. |
| Android.Util.IAttributeSet | attributeSet | The Android.Util.IAttributeSet. |
| System.Int32 | definedStyle | The value indicating the defined style |
| System.Int32 | definedResource | The value indicating the defined resource |
SfPullToRefresh(IntPtr, JniHandleOwnership)
Initializes a new instance of SfPullToRefresh class.
Declaration
public SfPullToRefresh(IntPtr javaReference, JniHandleOwnership transfer)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IntPtr | javaReference | The System.IntPtr. |
| Android.Runtime.JniHandleOwnership | transfer | The Android.Runtime.JniHandleOwnership. |
Properties
IsRefreshing
Gets a value indicating whether to enable or disable the refreshing or not.
Declaration
public bool IsRefreshing { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | A value indicating whether to enable or disable the refreshing or not. |
Progress
Gets the percentage of the progress of pulling.
Declaration
public float Progress { get; }
Property Value
| Type | Description |
|---|---|
| System.Single | The percentage of the progress of pulling. |
ProgressBackgroundColor
Gets or sets the progress background color of the SfPullToRefresh.
Declaration
public Color ProgressBackgroundColor { get; set; }
Property Value
| Type | Description |
|---|---|
| Android.Graphics.Color | The progress background color of the SfPullToRefresh. |
ProgressShadowColor
Gets or sets the shadow color of the progress view.
Declaration
public Color ProgressShadowColor { get; set; }
Property Value
| Type | Description |
|---|---|
| Android.Graphics.Color | The shadow color of the progress view. |
ProgressStrokeColor
Gets or sets the progress stroke color of the SfPullToRefresh.
Declaration
public Color ProgressStrokeColor { get; set; }
Property Value
| Type | Description |
|---|---|
| Android.Graphics.Color | The progress stroke color of the SfPullToRefresh. |
ProgressStrokeWidth
Gets or sets the progress indicator stroke width.
Declaration
public double ProgressStrokeWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double | The progress indicator stroke width. |
PullableContent
Gets or sets the pullable content of the SfPullToRefresh.
Declaration
public View PullableContent { get; set; }
Property Value
| Type | Description |
|---|---|
| Android.Views.View | The pullable content of the SfPullToRefresh. |
PullingThreshold
Gets or sets the value for the pulling threshold, this indicate progress indicator maximum pulling position in view.
Declaration
public int PullingThreshold { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The value for the pulling threshold, this indicate progress indicator maximum pulling position in view. |
RefreshContentRadius
Gets or sets the radius of the refreshing view.
Declaration
public int RefreshContentRadius { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The radius of the refreshing view. |
RefreshContentThreshold
Gets or sets the refresh content threshold value that indicates progress indicator starting position in view.
Declaration
public int RefreshContentThreshold { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The refresh content threshold value that indicates progress indicator starting position in view. |
TransitionType
Gets or sets the transition mode of the SfPullToRefresh.
Declaration
public TransitionType TransitionType { get; set; }
Property Value
| Type | Description |
|---|---|
| TransitionType | The transition mode of the SfPullToRefresh. |
Methods
add_Pulling(PullingEventHandler)
Declaration
public void add_Pulling(PullingEventHandler value)
Parameters
| Type | Name | Description |
|---|---|---|
| PullingEventHandler | value |
add_Refreshed(RefreshedEventHandler)
Declaration
public void add_Refreshed(RefreshedEventHandler value)
Parameters
| Type | Name | Description |
|---|---|---|
| RefreshedEventHandler | value |
add_Refreshing(RefreshingEventHandler)
Declaration
public void add_Refreshing(RefreshingEventHandler value)
Parameters
| Type | Name | Description |
|---|---|---|
| RefreshingEventHandler | value |
Dispose(Boolean)
Releases the unmanaged resources used by the component and optionally releases the managed resources.
Declaration
protected override void Dispose(bool isDisposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | isDisposing | if true - release both managed and unmanaged resources; if false - release only unmanaged resources. |
EndRefreshing()
Ends refreshing the pullable content stopping the refreshing animation.
Declaration
public void EndRefreshing()
OnInterceptTouchEvent(MotionEvent)
This method fires when touch is intercepted in the view.
Declaration
public override bool OnInterceptTouchEvent(MotionEvent ev)
Parameters
| Type | Name | Description |
|---|---|---|
| Android.Views.MotionEvent | ev | The motion event being dispatched down the hierarchy. |
Returns
| Type | Description |
|---|---|
| System.Boolean | Returns true if the touch is handled. |
OnLayout(Boolean, Int32, Int32, Int32, Int32)
Called from layout when this view should assign a size and position to each of its children.
Declaration
protected override void OnLayout(bool changed, int left, int top, int right, int bottom)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | changed | A value indicating whether this is a new size or position for this view. |
| System.Int32 | left | Left position, relative to parent. |
| System.Int32 | top | Top position, relative to parent. |
| System.Int32 | right | Right position, relative to parent. |
| System.Int32 | bottom | Bottom position, relative to parent. |
OnMeasure(Int32, Int32)
Measures the view and its content to determine the measured width and the measured height.
Declaration
protected override void OnMeasure(int widthMeasureSpec, int heightMeasureSpec)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | widthMeasureSpec | The horizontal space requirements as imposed by the parent. |
| System.Int32 | heightMeasureSpec | The vertical space requirements as imposed by the parent. |
OnTouchEvent(MotionEvent)
This method fires when touch is intercepted in the view and handled.
Declaration
public override bool OnTouchEvent(MotionEvent e)
Parameters
| Type | Name | Description |
|---|---|---|
| Android.Views.MotionEvent | e | The motion event. |
Returns
| Type | Description |
|---|---|
| System.Boolean | Returns true if the touch is handled. |
remove_Pulling(PullingEventHandler)
Declaration
public void remove_Pulling(PullingEventHandler value)
Parameters
| Type | Name | Description |
|---|---|---|
| PullingEventHandler | value |
remove_Refreshed(RefreshedEventHandler)
Declaration
public void remove_Refreshed(RefreshedEventHandler value)
Parameters
| Type | Name | Description |
|---|---|---|
| RefreshedEventHandler | value |
remove_Refreshing(RefreshingEventHandler)
Declaration
public void remove_Refreshing(RefreshingEventHandler value)
Parameters
| Type | Name | Description |
|---|---|---|
| RefreshingEventHandler | value |
StartRefreshing()
Starts refreshing the pullable content displaying the refreshing animation.
Declaration
public void StartRefreshing()
Events
Pulling
Occurs when pulling operation is performed.
Declaration
public event PullingEventHandler Pulling
Event Type
| Type |
|---|
| PullingEventHandler |
Refreshed
Occurs once refreshing is completed.
Declaration
public event RefreshedEventHandler Refreshed
Event Type
| Type |
|---|
| RefreshedEventHandler |
Refreshing
Occurs when refreshing operation is started.
Declaration
public event RefreshingEventHandler Refreshing
Event Type
| Type |
|---|
| RefreshingEventHandler |