public class SettingAct.MagicTextLengthWatcher
extends java.lang.Object
implements android.text.TextWatcher
构造器和说明 |
---|
MagicTextLengthWatcher(int maxLength,
java.lang.String checkTextChange,
int type) |
限定符和类型 | 方法和说明 |
---|---|
void |
afterTextChanged(android.text.Editable s) |
void |
beforeTextChanged(java.lang.CharSequence s,
int start,
int count,
int after) |
protected int |
calculateLength(java.lang.CharSequence c)
計算字串的長度
|
void |
onTextChanged(java.lang.CharSequence s,
int start,
int before,
int count) |
void |
setMaxLength(int maxLength) |
public MagicTextLengthWatcher(int maxLength, java.lang.String checkTextChange, int type)
public final void setMaxLength(int maxLength)
public void beforeTextChanged(java.lang.CharSequence s, int start, int count, int after)
beforeTextChanged
在接口中 android.text.TextWatcher
public void onTextChanged(java.lang.CharSequence s, int start, int before, int count)
onTextChanged
在接口中 android.text.TextWatcher
public void afterTextChanged(android.text.Editable s)
afterTextChanged
在接口中 android.text.TextWatcher
protected int calculateLength(java.lang.CharSequence c)
c
- 傳入字串