Android7.0中文文档(API)-- TextView

完整内容,请查看: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

摘要


嵌套类

enumTextView.BufferType

Type of the text buffer that defines the characteristics of the text such as static, styleable, or editable. 
文本缓冲区的类型,它定义了文本的特征,如静态的,可样式化的或可编辑的。 

interfaceTextView.OnEditorActionListener

Interface definition for a callback to be invoked when an action is performed on the editor. 
回调的接口定义,当在编辑器上执行操作时调用。 

classTextView.SavedState

User interface state that is stored by TextView for implementing onSaveInstanceState()
由TextView存储的用户接口状态,用于onSaveInstanceState()的实现。 

XML属性

android:autoLink控制是否自动找到url和电子邮件地址等链接,并转换为可点击的链接。 
android:autoSizeMaxTextSizeauto-sizing文本,使用的最大文本长度限制。

May be a dimension value, which is a floating point number appended with a unit such as "14.5sp". 
尺寸,带单位的一个浮点数,例如:14.5sp。 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值