Page 391 - MDP2020-1
P. 391

················································································  명장양성프로젝트  【MDP】  과제발표회  자료집  Ⅰ    |  385




            import  androidx.appcompat.app.AlertDialog;
            import  androidx.appcompat.app.AppCompatActivity;



            import  com.android.volley.RequestQueue;
            import  com.android.volley.Response;
            import  com.android.volley.toolbox.Volley;



            import  org.json.JSONException;
            import  org.json.JSONObject;


            public  class  RegisterActivity  extends  AppCompatActivity  {
            private  EditText  et_id,  et_pass,  et_name,  et_age,et_passck;
            private  Button  btn_register,validateButton;

            private  AlertDialog  dialog;
            private  boolean  validate=false;
            private  boolean  validate_check  =  false;



            @Override
            protected  void  onCreate(Bundle  savedInstanceState)  {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.register_layout);


            //  아이디  값  찾아주기

            et_id=findViewById(R.id.et_id);
            et_pass=findViewById(R.id.et_pass);
            et_name=findViewById(R.id.et_name);
            et_age=findViewById(R.id.et_age);
            et_passck=findViewById(R.id.et_passck);



            validateButton=findViewById(R.id.validateButton);
            validateButton.setOnClickListener(new  View.OnClickListener()  {                        //  id중복
            체크
            @Override

            public  void  onClick(View  view)  {
            String  userID=et_id.getText().toString();
            if(validate)
            {
            return;

            }
            if(userID.equals("")){                  //  아이디  입력  칸이  빈칸일  때
   386   387   388   389   390   391   392   393   394   395   396