注释部分代码,可用
com.example.xmskf.learnvolleyandroid.app.ProgressDialogandroid.os.Bundleandroid.support.v7.app.AppCompatActivitycom.android.volley.RequestQueuecom.android.volley.Responsecom.android.volley.VolleyErrorcom.android.volley.toolbox.JsonArrayRequestcom.android.volley.toolbox.Volleyorg.json.JSONArrayMainActivity AppCompatActivity { (Bundle savedInstanceState) { .onCreate(savedInstanceState)setContentView(R.layout.)String url = ProgressDialog progressDialog = ProgressDialog.()RequestQueue mQueue = Volley.()Response.Listener<JSONArray> listener =Response.Listener<JSONArray>() { (JSONArray jsonArray) { System..println(+jsonArray)(.isShowing()&&!=){ .dismiss()} } }Response.ErrorListener errorListener =Response.ErrorListener(){ (VolleyError volleyError) { System..println()System..println(volleyError)} }JsonArrayRequest jsonArrayRequest=JsonArrayRequest(urllistenererrorListener){}mQueue.add(jsonArrayRequest)} }
时间: 2024-11-03 21:23:52