Android EditText common properties Android non editable single line display can slide to view content
•
Android
① EditText is an input box, which is a common control in Android development. It is also a way to obtain user data.
② EditText is a subclass of textview, which inherits all properties of textview.
① Number can only enter numbers
② Numberdecimal can only enter floating point (decimal) integers
③ With password, the input text is displayed... And the user enters the password
④ Textmultiline multiline input
⑤ Textnosuggestions no hints
et.setFocusable(true); et.requestFocus(); et.setFocusableInTouchMode(true);
et.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence,int i,int i1,int i2) {
//文本改变前
}
@Override
public void onTextChanged(CharSequence charSequence,int i2) {
//文本改变时
}
@Override
public void afterTextChanged(Editable editable) {
//文本改变后,一般使用此方法
}
});
Android can't edit single line display and can slide to view content
[effect] compile the login interface in combination with other properties and controls
[Code]
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码