kotlin小笔记之 post ,postDelayed的写法

2019-05-29  本文已影响0人  kot_flu

post 和postDelayed 的写法


post.jpg

带Runnable和不带Runnable的写法

 refreshLayout?.postDelayed(
            {adapter?.loadMoreComplete()},300
        )

        refreshLayout?.postDelayed(
            Runnable { adapter?.loadMoreComplete()},200
        )

refreshLayout?.post {
            refreshLayout?.setRefreshing(refreshing)
        }

        refreshLayout?.post(
            Runnable {
                refreshLayout?.setRefreshing(refreshing)
            }
        )
``
上一篇下一篇

猜你喜欢

热点阅读