public void onResponse(String response) { try{ final JSONObject jsonObject=new JSONObject(response); String success= jsonObject.getString("success"); if(success.equals("1")){ Toast.makeText(RegisterActivity.this,"register success",Toast.LENGTH_SHORT).show(); } } catch (JSONException e){ e.printStackTrace(); Toast.makeText(RegisterActivity.this,"register error"+e.toString(),Toast.LENGTH_SHORT).show(); loading.setVisibility(View.GONE); btn_regist.setVisibility(View.VISIBLE); } } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { Toast.makeText(RegisterActivity.this,"register error"+error.toString(),Toast.LENGTH_SHORT).show(); loading.setVisibility(View.GONE); btn_regist.setVisibility(View.VISIBLE); } })
public void onResponse(String response) {
try{
final JSONObject jsonObject=new JSONObject(response);
String success= jsonObject.getString("success");
if(success.equals("1")){
Toast.makeText(RegisterActivity.this,"register success",Toast.LENGTH_SHORT).show();
}
}
catch (JSONException e){
e.printStackTrace();
Toast.makeText(RegisterActivity.this,"register error"+e.toString(),Toast.LENGTH_SHORT).show();
loading.setVisibility(View.GONE);
btn_regist.setVisibility(View.VISIBLE);
}
}
},
new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
Toast.makeText(RegisterActivity.this,"register error"+error.toString(),Toast.LENGTH_SHORT).show();
loading.setVisibility(View.GONE);
btn_regist.setVisibility(View.VISIBLE);
}
})