TextView中的(s / g)etFreezesText是什么?



 **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) 


当我们应该使用这些方法(如果有的话)? 他们是新的还是我刚刚注意到他们?

Solutions Collecting From Web of "TextView中的(s / g)etFreezesText是什么?"

如果你想强制你的TextView (或EditText等等)来保存它的状态,你必须添加freezesText属性:

 <TextView ... android:freezesText="true" /> 


如果设置,除了元数据(如当前的光标位置)之外,文本视图将在冻结冰柱内包括其当前的完整文本。 默认情况下这是禁用的; 当文本视图的内容不存储在诸如内容提供者的持久位置时,它可能是有用的

从API 1开始,属性和方法就已经存在了,所以我只能说你注意到了它。