TextView.SetTextKeepState 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| SetTextKeepState(ICharSequence) |
設定要顯示的文字,但會保留游標位置。 |
| SetTextKeepState(String) |
設定要顯示的文字,但會保留游標位置。 |
| SetTextKeepState(ICharSequence, TextView+BufferType) |
設定要顯示的文字,但會保留游標位置。 |
| SetTextKeepState(String, TextView+BufferType) |
設定要顯示的文字,但會保留游標位置。 |
SetTextKeepState(ICharSequence)
設定要顯示的文字,但會保留游標位置。
[Android.Runtime.Register("setTextKeepState", "(Ljava/lang/CharSequence;)V", "")]
public void SetTextKeepState(Java.Lang.ICharSequence? text);
[<Android.Runtime.Register("setTextKeepState", "(Ljava/lang/CharSequence;)V", "")>]
member this.SetTextKeepState : Java.Lang.ICharSequence -> unit
參數
- text
- ICharSequence
待顯示的文字
- 屬性
備註
設定要顯示的文字,但會保留游標位置。 和這點一樣 #setText(CharSequence) ,只是游標位置(如果有的話)會保留在新文字中。
當需要時,TextView 會使用 android.text.Spannable.Factory 來建立期末或中間的 Spannable Spannables。 同樣地,它會用 android.text.Editable.Factory 來生成最終或中間的 Editable Editables。
Java 文件 android.widget.TextView.setTextKeepState(java.lang.CharSequence)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
另請參閱
適用於
SetTextKeepState(String)
設定要顯示的文字,但會保留游標位置。
public void SetTextKeepState(string? text);
member this.SetTextKeepState : string -> unit
參數
- text
- String
待顯示的文字
備註
設定要顯示的文字,但會保留游標位置。 和這點一樣 #setText(CharSequence) ,只是游標位置(如果有的話)會保留在新文字中。
當需要時,TextView 會使用 android.text.Spannable.Factory 來建立期末或中間的 Spannable Spannables。 同樣地,它會用 android.text.Editable.Factory 來生成最終或中間的 Editable Editables。
Java 文件 android.widget.TextView.setTextKeepState(java.lang.CharSequence)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
SetTextKeepState(ICharSequence, TextView+BufferType)
設定要顯示的文字,但會保留游標位置。
[Android.Runtime.Register("setTextKeepState", "(Ljava/lang/CharSequence;Landroid/widget/TextView$BufferType;)V", "")]
public void SetTextKeepState(Java.Lang.ICharSequence? text, Android.Widget.TextView.BufferType? type);
[<Android.Runtime.Register("setTextKeepState", "(Ljava/lang/CharSequence;Landroid/widget/TextView$BufferType;)V", "")>]
member this.SetTextKeepState : Java.Lang.ICharSequence * Android.Widget.TextView.BufferType -> unit
參數
- text
- ICharSequence
待顯示的文字
- type
- TextView.BufferType
- 屬性
備註
Java 文件 android.widget.TextView.setTextKeepState(java.lang.CharSequence)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
另請參閱
- <xref:Android.Widget.TextView.SetText(Java.Lang.ICharSequence%2c+.BufferType)>
適用於
SetTextKeepState(String, TextView+BufferType)
設定要顯示的文字,但會保留游標位置。
public void SetTextKeepState(string? text, Android.Widget.TextView.BufferType? type);
member this.SetTextKeepState : string * Android.Widget.TextView.BufferType -> unit
參數
- text
- String
待顯示的文字
- type
- TextView.BufferType
備註
Java 文件 android.widget.TextView.setTextKeepState(java.lang.CharSequence)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。