안드로이드 개발 질문/답변
(글 수 45,052)
안녕하세요
Dialog를 만들었는데
ok버튼, cancle 버튼, 타이틀 이렇게 해놧는데요
리스트에서 라디오버튼이나 체크박스로 선택하는거말고
사용자가 직접 텍스트를 입력하게 하고싶은데 .. 잘 못하겠습니다 ㅠ
텍스트입력받은걸 ok버튼 눌러서 정보를 넘겨줘야되는데 말이죠 ㅠ
public void myser() {
new AlertDialog.Builder(this)
.setTitle("검색 명칭 입력")
.setPositiveButton("Serch", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dlg, int sumthin) {
}
})
.setNeutralButton("Close", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dlg, int sumthin) {
}
})
.show();
}
저리해놓고 있는데요..edittext 를 이용하여 입력받을수 있나요 ??
사진에서 아이폰과 같이 저리하고 싶습니다 ㅠ
2010.03.02 12:37:08
public AlertDialog.Builder setView (View view)
Since: API Level 1
Set a custom view to be the contents of the Dialog. If the supplied view is an instance of a ListView the light background will be used.
Parameters
| view | The view to use as the contents of the Dialog. |
|---|
Returns
- This Builder object to allow for chaining of calls to set methods
아이디가 아니라 생성된 EditText 객체를 넘겨주면 됩니다.




TextEdit를 한번 살펴보시기 바랍니다.