如何实现机器人拉来刷新机器人、如何实现

由网友(小苹果ゝ冭孖)分享简介:在Android应用程序,如Twitter(官方应用程序),当你遇到一个ListView的时候,你可以拉下来(而且它还会弹回来时发布)刷新内容。In Android applications such as Twitter (official app), when you encounter a ListView,...

在Android应用程序,如Twitter(官方应用程序),当你遇到一个ListView的时候,你可以拉下来(而且它还会弹回来时发布)刷新内容。

In Android applications such as Twitter (official app), when you encounter a ListView, you can pull it down (and it will bounce back when released) to refresh the content.

我不知道什么是最好的方式,在您看来,实施了吗?

I wonder what is the best way, in your opinion, to implement that?

一些可能性我能想到的:

Some possibilities I could think of:

在ListView控件的顶部的项目 - 但我不认为与动画的ListView的滚动返回到项目位置1(0型)是一件容易的事 在ListView外另一种观点 - 但我需要移动的ListView位置向下时,它拉的关怀,我不知道,如果我们可以检测,如果拖动触摸到ListView还真上滚动的物品ListView控件。

任何建议?

P.S。我不知道,当官方Twitter的应用程序源$ C ​​$ C被释放。前面已经讲过,它会被释放,除了6几个月过去了,我们还没有听说这件事至今。

P.S. I wonder when the official Twitter app source code is released. It has been mentioned that it will be released, but 6 months has passed and we haven't heard about it since then.

推荐答案

最后,谷歌发布了拉来刷新库的正式版!

Finally, Google released an official version of pull-to-refresh library!

这就是所谓SwipeRefreshLayout,支持库中,并且该文档是在这里:

It is called SwipeRefreshLayout, inside the support library, and the documentation is here:

https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.html

阅读全文

相关推荐

最新文章