实施AsyncQueryHandlerAsyncQueryHandler

由网友(情渡)分享简介:我想实现 AsyncQueryHandler ,因为我遇到这个完全相同的问题,link但我没有看到任何其实现的例子或任何东西。I am trying to implement AsyncQueryHandler because I am experiencing the same exact problem in t...

我想实现 AsyncQueryHandler ,因为我遇到这个完全相同的问题,link但我没有看到任何其实现的例子或任何东西。

I am trying to implement AsyncQueryHandler because I am experiencing the same exact problem in this link but I dont see any example or anything about implementing it.

我试图做

AsyncQueryHandler handler = new AsyncQueryHandler(getContentResolver());

因为这是构造显示在文档但我得到一个错误说无法实例的类型AsyncQueryHandler 让我怎么使用它呢?

since that is what the constructor shows in the docs but I get an error saying cannot instantiate the type AsyncQueryHandler so how do I use it then?

推荐答案

AsyncQueryHandler是一个抽象类,所以你不能直接实例化。你需要它的子类。

AsyncQueryHandler is an abstract class, thus you cannot instantiate it directly. You need to subclass it.

阅读全文

相关推荐

最新文章