0
edittext에 문자를 입력하고 edittext lenth가 3보다 크고 3을 넘으면 편집 텍스트의 텍스트를 런타임에 변경하려고합니다.런타임에 EditText의 텍스트를 android에서 런타임에 변경하는 방법
누구든지이 작업을 수행해 주시면 알려주세요. 사전에
감사
Trapti이
edittext에 문자를 입력하고 edittext lenth가 3보다 크고 3을 넘으면 편집 텍스트의 텍스트를 런타임에 변경하려고합니다.런타임에 EditText의 텍스트를 android에서 런타임에 변경하는 방법
누구든지이 작업을 수행해 주시면 알려주세요. 사전에
감사
Trapti이
당신은 문자가 글고 필드에서 입력되거나 제거 될 때마다 호출되는 글고 치기위한 TextWatcher 등록 할 수 있습니다
EditText editText = (EditText) findViewById(R.id.edit_text_field_id);
editText.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
// This method is called to notify you that, within s, the count characters
// beginning at start are about to be replaced by new text with length after.
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
// This method is called to notify you that, within s, the count characters
// beginning at start have just replaced old text that had length before.
}
@Override
public void afterTextChanged(Editable s) {
// This method is called to notify you that, somewhere within s, the text has
// been changed.
}
});
이 TextWatcher에 대한 설명서를 참조하십시오를 자세한 내용은
명확히하십시오. "대괄호 유지"란 무엇을 의미합니까? –