A helper adding a pull-to-refresh control to an AppListView. More...
Import Statement: | import Felgo 4.0 |
Inherits: |
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() } }
It can also be used with an AppFlickable like this:
AppFlickable { id: flickable PullToRefreshHandler { listView: flickable // this must be manually set to the Flickable in this case onRefresh: twitterClient.loadNextTweets() } }
contentColor : color |
The color of the indicator icons displayed behind the list content while pulling or refreshing.
listView : Flickable |
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
.
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.
Note: The corresponding handler is onRefresh
.
As part of the free Business evaluation, we offer a free welcome call for companies, to talk about your requirements, and how the Felgo SDK & Services can help you. Just sign up and schedule your call.
Sign up now to start your free Business evaluation: