Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!

PullToRefreshHandler

A helper adding a pull-to-refresh control to an AppListView. More...

Import Statement: import Felgo 3.0

Properties

Signals

Detailed Description

This item is a convenience item that can be added as header of an AppListView to implement a pull-to-refresh behavior.

The item emits the refresh signal as soon as the user pulls the containing list view down until a certain pull threshold is reached.

This reload pattern is often used in apps that display a time-sorted feed of content items.

As an example you can load the next 20 tweets in your Twitter app as soon as a user reaches the top of the feed, as shown in the following sample:

 AppListView {
   PullToRefreshHandler {
     onRefresh: twitterClient.loadNextTweets()
   }
 }

Property Documentation

contentColor : color

The color of the indicator icons displayed behind the list content while pulling or refreshing.


listView : ListView

The AppListView this item belongs to. This property is set automatically as soon as the item gets set as the header or footer of an AppListView.


pullToRefreshEnabled : bool

Set to false to disable pull-to-refresh. By default this property is set to true and therefore visible on top of the list view.


refreshing : bool

Set this to true as long as your content is refreshing. The indicator will stay docked as long as refreshing is true.


Signal Documentation

refresh()

Emitted as soon as the item got pulled and released again. You can take appropriate actions to handle the data reload or load more items for your list.