Page 115 - MDP2022-2
P. 115

Intent  intent  =  new  Intent(MainActivity.this  ,popup.class);
                                            intent.putExtra("data","로그인  실패!\n아이디  정보를  확인하세요!");
                                            startActivityForResult(intent,  1);
                                    }
                                    else  if(result.equals("PWD  error"))
                                    {
                                            Intent  intent  =  new  Intent(MainActivity.this  ,popup.class);
                                            intent.putExtra("data","로그인  실패!\n비밀번호  정보를  확인하세요!");
                                            startActivityForResult(intent,  1);
                                    }
                                    else  if(result.equals("no"))
                                    {
                                            Intent  intent  =  new  Intent(MainActivity.this  ,popup.class);
                                            intent.putExtra("data","입력해주세요");
                                            startActivityForResult(intent,  1);
                                    }
                                    else{
                                            if  (result.isEmpty())  {}
                                            else  {


                                                    String[]  main  =  result.split(",");
                                                    name=  main[0];
                                                    temperature_now  =  main[1];
                                                    moist  =  main[2];
                                                    temperature_want  =  main[3];
                                                    id2  =  main[4];
                                                    pwd  =  main[5];
                                                    phone  =  main[6];


                                                    Toast.makeText(getApplicationContext(),  name+"님  로그인  성공!",  Toast.LENG
            TH_SHORT).show();
                                                    Intent  intent  =  new  Intent(MainActivity.this,  infor.class);


                                                    intent.putExtra("ID",  ID);
                                                    startActivity(intent);
                                                    finish();


                                            }
                                    }


                            }
                    }
            }
            로그인  화면(xml)
            <?xml  version="1.0"  encoding="utf-8"?>
   110   111   112   113   114   115   116   117   118   119   120