完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/EditText.html
EditText
public class EditText
extends TextView
java.lang.Object | |||
↳ | android.view.View | ||
↳ | android.widget.TextView | ||
↳ | android.widget.EditText |
EditText is a thin veneer over TextView that configures itself to be editable.
EditText是在TextView基础上的一层薄薄的封装,TextView自身也可以配置成可编辑的。
See the Text Fields guide.
请参考Text Fields指南。
This widget does not support auto-sizing text.
此控件不支持对文本自适应(auto-sizing)。
XML attributes
XML属性
See EditText Attributes
, TextView Attributes
, View Attributes
请参考EditText Attributes
,TextView Attributes
。 View Attributes
摘要
继承XML属性 | |
---|---|
From class android.widget.TextView
| |
From class android.view.View
|
继承常量 |
---|
From class android.widget.TextView
|
From class android.view.View
|
继承字段 |
---|
From class android.view.View
|
Public构造方法 | |
---|---|
EditText(Context context) | |
EditText(Context context, AttributeSet attrs) | |
EditText(Context context, AttributeSet attrs, int defStyleAttr) | |
EditText(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) |
Public方法 | |
---|---|
void | extendSelection(int index) Convenience for |
CharSequence | getAccessibilityClassName() Return the class name of this object to be used for accessibility purposes. |
boolean | getFreezesText() Return whether this text view is including its entire text contents in frozen icicles. |
Editable | getText() Return the text that TextView is displaying. |
void | selectAll() Convenience for |
void | setEllipsize(TextUtils.TruncateAt ellipsis) Causes words in the text that are longer than the view's width to be ellipsized instead of broken in the middle. |
void | setSelection(int start, int stop) Convenience for |
void | setSelection(int index) Convenience for |
void | setText(CharSequence text, TextView.BufferType type) Sets the text to be displayed and the |