阅读背景:

OnClick动态地向TableLayout添加新行,并从数据库中获取值,在添加的行中显示它并给出总计

来源:互联网 

This is the link to the screen

这是屏幕的链接

  private void sendBarcode(final String barcodeNum)throws JSONException
{
    final Context context = getApplicationContext();

    StringRequest stringReq = new StringRequest(Request.Method.POST, ITEM_URL,
            new Response.Listener<String>() {
                @Override
                public void onResponse(String response) {

                    showItem(response);

                }
            },
            new Response.ErrorListener() {
                @Override
                public void onErrorResponse(VolleyError error) {
                    Toast.makeText(context, error.toString(), Toast.LENGTH_SHORT).show();
                }
            }){
        @Override
        protected Map<String, String> getParams() throws AuthFailureError
        {
            Map<String,String> params = new HashMap<>();
            params.put(KEY_BARCODE,barcodeNum);
            return params;

        }
    };
    RequestQueue reqQueue = Volley.newRequestQueue(context);
    reqQueue.add(stringReq);

}
  pr



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: