描述:下拉刷新和上拉加载
复杂度:★★★★☆
分组:【Dora大控件组】
关系:暂无
技术要点:事件分发、视图动画、布局容器的布局
val pullableLayout = findViewById<PullableLayout>(R.id.pullableLayout)
pullableLayout.setOnRefreshListener(object : PullableLayout.OnRefreshListener {
override fun onRefresh(layout: PullableLayout) {
pullableLayout.postDelayed(Runnable { pullableLayout.refreshFinish(PullableLayout.SUCCEED) }, 1000)
}
override fun onLoadMore(layout: PullableLayout) {
pullableLayout.postDelayed(Runnable { pullableLayout.loadMoreFinish(PullableLayout.SUCCEED) }, 1000)
}
})
阅读量:1862
点赞量:0
收藏量:0