Page 720 - 3-2
P. 720
insertoToDatabase(sName, sId, sPassword);
}
else {
Toast.makeText(getApplicationContext(),
" 개인 정보 수집 동의란에 체크해주세요.",
Toast.LENGTH_SHORT).show();
}
}
}
public boolean checkBlank() {
String name = ((EditText)findViewById(R.id.name_text)).getText().toString();
String id = ((EditText)findViewById(R.id.id_text)).getText().toString();
String password = ((EditText)findViewById(R.id.password_text)).getText().toString();
if((name.equals("")) || (id.equals("")) || (password.equals(""))) {
Toast.makeText(getApplicationContext(),
" 입력되지 않은 칸이 있습니다.", Toast.LENGTH_SHORT).show();
return false;
}
else return true;
}
private void insertoToDatabase(String name, String id, String password) {
class InsertData extends AsyncTask<String, Void, String> {
ProgressDialog loading;
@Override
protected void onPreExecute() {
super.onPreExecute();
loading = ProgressDialog.show(MemberActivity.this, "Please Wait", null, true,
true);
}
@Override
protected void onPostExecute(String s) {
super.onPostExecute(s);
loading.dismiss();
Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();
}
@Override
protected String doInBackground(String... params) {
try {
- 720 -