text박스가 잇는 다이얼로그를 생성하였습니다.
텍스트박스에 내용을 입력 후 확인을 누르면
텍스트박스에 있는 내용을 얻어서 그내용을 업로드 하능 기능입니다.
코드상에는 에러가 없는데 app을 실행할경우
텍스트박스에 내용을입력하고 확인을 누를경우 app이 중지됩니다 ㅠㅠㅠㅠ
어떻게해야할까요 ㅠㅠㅠ
도와주세용 ㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠ
protected Dialog onCreateDialog(int id) {
switch (id) {
case UPLOAD_BUTTON:
LayoutInflater inflater = getLayoutInflater();
final View update_drl = inflater.inflate(R.layout.update_drl, null);
final EditText drl_txt;
drl_txt = (EditText)findViewById(R.id.upload_text);
return new AlertDialog.Builder(facebookActivity.this)
.setTitle("SNS업로드")
.setView(update_drl).setPositiveButton("확인",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (mFacebook.isSessionValid()) {
String commentString = drl_txt.getText()
.toString();
try {
Bundle parameters = new Bundle();
parameters.putString("message",
commentString);
mAsyncRunner
.request(
USER_ID + "/feed",
parameters,
"POST",
new WallPostRequestListener(),
null);
} catch (Exception e) {
e.printStackTrace();
}
} else {
Toast.makeText(facebookActivity.this,
"Not Authorized!", Toast.LENGTH_SHORT)
.show();
}
}
}).setNegativeButton("취소", null).create();
}
return null;
}




LayoutInflater inflater = getLayoutInflater();
final View update_drl = inflater.inflate(R.layout.update_drl, null);
final EditText drl_txt;
drl_txt = (EditText)findViewById(R.id.upload_text);
return new AlertDialog.Builder(facebookActivity.this)
.setTitle("SNS업로드")
-------------------------이부분들이 잘못되있네요
커스텀다이얼로그로 찾아보세요