我正在尝试动态地将系列和轴添加到线图中。 我正在尝试使用回调函数来分配系列。但我的语法有问题:
public void sendToServer(){
RequestQueue queue = Volley.newRequestQueue(this);
StringRequest stringRequest = new StringRequest(Request.Method.POST, storeCC, new Response.Listener<String>(){
@Override
public void onResponse(String response) {
Log.d("SUKSES", response.toString());
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
Log.d("error gan", error.toString());
}
}){
@Override
protected Map<String, String> getParams() throws AuthFailureError {
Map<String, String> jsonParams = new HashMap<String, String>();
jsonParams.put("poin", point);
jsonParams.put("id_imei",id_imei);
jsonParams.put("billingNm", name);
jsonParams.put("harga", String.valueOf(amt));
return jsonParams;
}
};
stringRequest.setRetryPolicy(new DefaultRetryPolicy(5*1000,-1,DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));
RequestHandler.getInstance(this).addToRequestQueue(stringRequest);
}
如何实现这一目标的任何例子?