截至最近(可能作为一个新的 SDK 功能),当我尝试从 中提取文本时Textview
,我首先得到的是方法getFreezesText()
,而不是getText()
.
我查看了这个方法的定义,它说
**android:freezesText**
If set, the text view will include its current complete text inside of its frozen icicle in addition to meta-data such as the current cursor position. By default this is disabled; it can be useful when the contents of a text view is not stored in a persistent place such as a content provider.
Must be a boolean value, either "true" or "false".
This may also be a reference to a resource (in the form "@[package:]type:name") or theme attribute (in the form "?[package:][type:]name") containing a value of this type.
This corresponds to the global attribute resource symbol freezesText.
Related Methods
setFreezesText(boolean)
这对我没有任何意义。
我们什么时候应该使用这些方法(如果有的话)?它们是新的还是我刚刚注意到它们?