public void onClick(View v) {
dialog_board = ProgressDialog.show
(RSS_TestActivity.this,"","Validating user...",true);
new Thread(new Runnable(){
public void run(){
Looper.prepare();
board_insert();
Looper.loop();
}
}).start();
}
});
}
public void board_insert(){
try{
httpclient_board=new DefaultHttpClient();
httppost_board = new HttpPost("DB주소.com");
nameValuePairs_board = new ArrayList<NameValuePair>(4);
nameValuePairs_board.add(new BasicNameValuePair("module_srl",module_srl.toString()));
nameValuePairs_board.add(new BasicNameValuePair("title",write_title.getText().toString()));
nameValuePairs_board.add(new BasicNameValuePair("nick_name",write_writer.getText().toString()));
nameValuePairs_board.add(new BasicNameValuePair("password",write_pass.getText().toString()));
httppost_board.setEntity(new UrlEncodedFormEntity(nameValuePairs_board));
response_board=httpclient_board.execute(httppost_board);
ResponseHandler<String> responseHandler = new BasicResponseHandler();
final String response = httpclient_board.execute(httppost_board,responseHandler);
runOnUiThread(new Runnable(){
public void run(){
dialog_board.dismiss();
nameValuePairs_board.notify();
}
});
Toast.makeText(RSS_TestActivity.this,"아아",Toast.LENGTH_SHORT ).show();
finish();
}catch(Exception e){
dialog_board.dismiss();
System.out.println("Exception:"+e.getMessage());
}
버튼을 누르면
DB에 데이터를 보내는형태인데..
한번만보내면되는데
두번보내네요 ㅜㅜ..
쓰레드 문제인거 같긴한데..
무슨 문제가 있는걸까요ㅜㅜ?