完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/TextView.html
TextView
public class TextView
extends View implements ViewTreeObserver.OnPreDrawListener
| java.lang.Object | ||
| ↳ | android.view.View | |
| ↳ | android.widget.TextView | |
Displays text to the user and optionally allows them to edit it. A TextView is a complete text editor, however the basic class is configured to not allow editing; see EditText for a subclass that configures the text view for editing.
向用户显示文本,并且可以选择允许用户编辑它。TextView是一个完整的文本编辑器,但是基类被配置成不可编辑的;请参考EditText子类,它被配置成可编辑的文本视图。
To allow users to copy some or all of the TextView's value and paste it somewhere else, set the XML attribute android:textIsSelectable to "true" or call setTextIsSelectable(true). The textIsSelectable flag allows users to make selection gestures in the TextView, which in turn triggers the system's built-in copy/paste controls.
为了允许用户复制部分或全部TextView的内容并将其粘贴到其他地方,可以设置XML属性android:textIsSelectable为true或调用setTextIsSelectable(true)。textIsSelectable表示允许用户在TextView中做出手势,这将会触发系统内置的复制/粘贴操作。
XML attributes
XML属性
See TextView Attributes, View Attributes
参考TextView Attributes View Attributes
摘要
嵌套类 | |
|---|---|
enum | TextView.BufferType Type of the text buffer that defines the characteristics of the text such as static, styleable, or editable. |
interface | TextView.OnEditorActionListener Interface definition for a callback to be invoked when an action is performed on the editor. |
class | TextView.SavedState User interface state that is stored by TextView for implementing |
XML属性 | |
|---|---|
android:autoLink | 控制是否自动找到url和电子邮件地址等链接,并转换为可点击的链接。 |
android:autoSizeMaxTextSize | auto-sizing文本,使用的最大文本长度限制。 May be a dimension value, which is a floating point number appended with a unit such as " |
本文详细介绍了Android中的TextView组件,包括其作为文本展示与编辑的功能、如何通过设置XML属性允许文本选择及复制,以及TextView的相关子类介绍。
-- TextView&spm=1001.2101.3001.5002&articleId=73468152&d=1&t=3&u=bc9ca132111046209aa18a6843e6587f)
3万+

被折叠的 条评论
为什么被折叠?



