V-Play 文档翻译 PullToRefreshHandler
来源:互联网 发布:linux查看tcp连接ip 编辑:程序博客网 时间:2024/05/20 20:43
V-Play 文档翻译 PullToRefreshHandler
翻译:qyvlik
列表页面的下拉更新。
VPlayApps 1.0
Inherits: Item
属性
contentColor
:color
listView
:ListView
pullToRefreshEnabled
:bool
refreshing
:bool
信号
refresh()
详细描述
This item is a convenience item that can be added as header
of an AppListView
to implement a pull-to-refresh behavior.
作为 header
添加到 AppListView
,用以实现下拉更新。
The item emits the refresh
signal as soon as the user pulls the containing list view down until a certain pull threshold is reached.
当用户向下拉动列表时,然后释放时,就会触发 refresh
信号。
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:
例如你在 Twitter
应用中,使用如下类似代码可以添加新的 20 条推文。
AppListView { PullToRefreshHandler { onRefresh: twitterClient.loadNextTweets() }}
属性文档
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
.
在设置为 header
或者 footer
时,其依附的 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.
是否允许下拉更新,设置为 false
就不可以使用这个功能。
refreshing
:bool
Set this to true
as long as your content is refreshing. The indicator will stay docked as long as refreshing is true
.
设置为 true
时,表示还在加载,如果设置为 false
,就不会显示加载指示器。
AppListView { emptyText.text: qsTr("下拉更新") pullToRefreshHandler.pullToRefreshEnabled: listView.contentY <= 0 pullToRefreshHandler.onRefresh: { pullToRefreshHandler.refreshing = true; // async.... doALongLoading(function(){ pullToRefreshHandler.refreshing = false; }) }}
信号文档
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.
当用户向下拉动列表时,然后释放时,就会触发 refresh
信号。
- V-Play 文档翻译 PullToRefreshHandler
- V-Play 文档翻译 App
- V-Play 文档翻译 Navigation
- V-Play 文档翻译 Page
- V-Play 文档翻译 ListPage
- Qt android v-play && 文档
- 安装 V-Play 笔记
- V-Play入门手册
- play framework(翻译)
- V-Play 使用粗体验
- play的开发文档
- (Spring文档翻译)Part V, the Web 17.1 Spring Web MVC framework介绍
- 翻译文档
- 文档翻译
- 【翻译】Play框架入门教程一:建立项目
- Play framework 框架入门学习文档(play-1.2.3)
- MongoDB文档翻译-引言-文档
- sphinx英文文档(v.1.11)
- uva 11817 大地坐标系
- String、StringBuilder、StringBuffer的区别
- js中arguments用法
- 蓝桥杯vip试题 龟兔赛跑
- 敏感词系统的设计思路
- V-Play 文档翻译 PullToRefreshHandler
- usaco 1-1-4 Broken Necklace
- Android开发之关闭多个Activity
- 开始linux之路
- 数组遍历的三种方式
- 1031. 查验身份证(15)
- Python sklearn包——mnist数据集下不同分类器的性能实验
- HDU1007(分治算法)
- 用 Pelican 和 github 打造你的个人主页