VolleyInterface POST封装无法传递
Volley自己封装的Post请求,在activity中为什么调用不到getParams这个方法?
Volley自己封装的Post请求,在activity中为什么调用不到getParams这个方法?
2016-07-14
封装了的啊,但是在MainActivity中想使用调用不到了
public static void RequestPost(Context context, String url, String tag, final Map<String, String> params, VolleyInterface vif) { MyApplication.getHttpQueues().cancelAll(tag); stringRequest = new StringRequest(url, vif.loadingListener(), vif.errorListener()) { @Override public Map<String, String> getParams() throws AuthFailureError { return params; } }; stringRequest.setTag(tag); MyApplication.getHttpQueues().add(stringRequest); MyApplication.getHttpQueues().start(); }
VolleyRequest.RequestPost(this, url, "abcJsonDefined", hashMap1, new VolleyInterface(this, VolleyInterface.mListener, VolleyInterface.mErrorListener) { @Override public void onMySuccess(String result) { } @Override public void onMyError(VolleyError error) { } });
举报