C# Class Refractored.XamForms.PullToRefresh.Droid.PullToRefreshLayoutRenderer

Inheritance: SwipeRefreshLayout, IVisualElementRenderer, SwipeRefreshLayout.IOnRefreshListener
显示文件 Open project: jamesmontemagno/Xamarin.Forms-PullToRefreshLayout

Private Properties

Property Type Description
CanScrollUp bool
HandlePropertyChanged void
UpdateColors void
UpdateContent void
UpdateIsRefreshing void
UpdateIsSwipeToRefreshEnabled void

Public Methods

Method Description
CanChildScrollUp ( ) : bool

Determines whether this instance can child scroll up. We do this since the actual swipe refresh can't figure it out

GetDesiredSize ( int widthConstraint, int heightConstraint ) : SizeRequest

Gets the size of the desired.

Init ( ) : void

Used for registration with dependency service

OnRefresh ( ) : void

The refresh view has been refreshed

PullToRefreshLayoutRenderer ( ) : System

Initializes a new instance of the Refractored.XamForms.PullToRefresh.Droid.PullToRefreshLayoutRenderer class.

SetElement ( VisualElement element ) : void

Setup our SwipeRefreshLayout and register for property changed notifications.

UpdateLayout ( ) : void

Updates the layout.

Private Methods

Method Description
CanScrollUp ( Android.Views.ViewGroup viewGroup ) : bool
HandlePropertyChanged ( object sender, PropertyChangedEventArgs e ) : void

Handles the property changed. Update the control and trigger refreshing

UpdateColors ( ) : void
UpdateContent ( ) : void

Managest adding and removing the android viewgroup to our actual swiperefreshlayout

UpdateIsRefreshing ( ) : void
UpdateIsSwipeToRefreshEnabled ( ) : void

Method Details

CanChildScrollUp() public method

Determines whether this instance can child scroll up. We do this since the actual swipe refresh can't figure it out
public CanChildScrollUp ( ) : bool
return bool

GetDesiredSize() public method

Gets the size of the desired.
public GetDesiredSize ( int widthConstraint, int heightConstraint ) : SizeRequest
widthConstraint int Width constraint.
heightConstraint int Height constraint.
return SizeRequest

Init() public static method

Used for registration with dependency service
public static Init ( ) : void
return void

OnRefresh() public method

The refresh view has been refreshed
public OnRefresh ( ) : void
return void

PullToRefreshLayoutRenderer() public method

Initializes a new instance of the Refractored.XamForms.PullToRefresh.Droid.PullToRefreshLayoutRenderer class.
public PullToRefreshLayoutRenderer ( ) : System
return System

SetElement() public method

Setup our SwipeRefreshLayout and register for property changed notifications.
public SetElement ( VisualElement element ) : void
element Xamarin.Forms.VisualElement Element.
return void

UpdateLayout() public method

Updates the layout.
public UpdateLayout ( ) : void
return void