3
그러나 나는이 이런 식으로 작동하지 않습니다액션
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle(title)
.setMessage(message)
.setPositiveButton(buttonPositif, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
// Send the positive button event back to the host activity
mListener.onDialogPositiveClick(EntryDialogFacade.this);
}
})
.setNegativeButton(buttonNegatif, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
// Send the negative button event back to the host activity
mListener.onDialogNegativeClick(EntryDialogFacade.this);
}
});
editText = new EditText(activity);
editText.setLines(1);
editText.setImeOptions(EditorInfo.IME_ACTION_DONE);
builder.setView(editText);
Dialog dialog = builder.create();
dialog.show();
내가 (코드 참조) 입력 필드 키보드에서 완료 버튼을 보여주기 위해 노력하고 대화의 표준 항목 팝업이 .
누구나 똑같은 경험을 했습니까?
건배.
감사합니다.하지만 청취자 없이는 완벽하게 작동하는 것 같습니다. –
XML에서'android : singleLine = "true"'가 사용되지 않지만, 'android : maxLines = "1"'이라는 속성을 제안하는 것은 android : imeOptions = "actionDone"'에서는 작동하지 않는다는 점에 흥미 롭습니다. 내가 쓸모없는 것을 사용할 것 같아. – tymbark