【发布时间】:2013-03-22 22:30:07
【问题描述】:
我有这样的代码:
public Dictionary<Object, Object> call(String method, Iterable args)
{
AsyncHttpClient client = new AsyncHttpClient();
client.get(getUrl(method, args), new AsyncHttpResponseHandler() {
@Override
public void onSuccess(String response)
{
Gson gson = new GsonBuilder().create();
}
});
}
我希望能够将(Dictionary<Object, Object>) gson.fromJson(response, Dictionary.class) 返回到我的call 方法,但是如何做?我使用http://loopj.com/android-async-http/ 拥有一个易于使用的异步 HTTP 请求系统。
谢谢!
【问题讨论】:
标签: android asynchronous return anonymous