1
返回值我有這樣的代碼:從一個匿名類
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請求系統。
謝謝!