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());
}