android.iでカスタムダイアログボックスを作成しました。dismiss()を使用してそれを閉じようとしましたが、それでもダイアログボックスが閉じられないので、以下のコードを参考にしてください。
void unsubPhoneNumberDialogBox(final ArrayList<String> unsubcribeList)
{
AlertDialog.Builder builder;
LayoutInflater inflater = (LayoutInflater) this.getSystemService(LAYOUT_INFLATER_SERVICE);
View layout = inflater.inflate(R.layout.customalert,null);
builder = new AlertDialog.Builder(SMSServiceListActivity.this);
builder.setView(layout);
alertDialog = builder.create();
input = (EditText)layout.findViewById(R.id.txtPhoneNo);
btnVerify = (Button)layout.findViewById(R.id.btnSendSMS);
btnVerify.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(input.getWindowToken(), 0);
alertDialog.dismiss();
}
});
alertDialog.show();
}