本文介绍了拉机器人刷新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
  如何实现机器人拉来刷新

我已经实现拉在我的应用程序,它在2.2工作正常刷新,但在2.0事实并非如此。

I have implemented pull to refresh in my app which works fine in 2.2, but in 2.0 it doesn't.

我找不到在2.0的方法smoothScrollBy()'。

I couldn't find the method 'smoothScrollBy()' in 2.0.

任何人都可以请您给我这个问题,或任何其他替代解决方案?我怎样才能acheive拉刷新功能,像iPhone?

Can anyone please give me the solution for this issue or any other alternative? How can I acheive pull to refresh functionality like in iphone?

谢谢..

推荐答案

smoothScrollBy 中引入了API版本8,所以它不是在其他版本。 (你可以看到API版本的方法是在详细的API的最右边可用,像这里)。

smoothScrollBy was introduced in API version 8, so it is not available in other versions. (You can see what API version a method is available in on the far right hand side of the detailed API, like here).

我不知道是什么刷新您的应用程序必须与 smoothScrollBy 虽然。如果你有一个的ListView 与适配器,您只需更新适配器的内容,并调用 notifyDataSetChanged()

I'm not sure what refreshing your app has to do with smoothScrollBy though. If you have a ListView with an adapter, you can just update the contents of the adapter and call notifyDataSetChanged()

这篇关于拉机器人刷新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-02 00:30