8
最近(可能作爲一個新的SDK功能),當我嘗試從Textview
拉文本時,我首先得到方法getFreezesText()
,而不是getText()
。什麼是(s/g)在TextView中的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)
這告訴我什麼都不是。
當我們應該使用這些方法(如果有的話)?他們是新的還是我剛剛注意到他們?
輸出結果如何?它只是可見的文本(如果文本長度大於TextView寬度)? – sandalone
該文檔說明了「當前的完整文本」。我個人雖然沒有使用它。 –