次の方法で共有


TextView.SetText Method

Definition

Overloads

SetText(Char[], Int32, Int32)

Sets the TextView to display the specified slice of the specified char array.

SetText(Int32, TextView+BufferType)

Sets the text to be displayed using a string resource identifier.

SetText(String, TextView+BufferType)

Sets the text to be displayed using a string resource identifier.

SetText(Int32)

Sets the text to be displayed using a string resource identifier.

SetText(ICharSequence, TextView+BufferType)

Sets the text to be displayed using a string resource identifier.

SetText(Char[], Int32, Int32)

Sets the TextView to display the specified slice of the specified char array.

[Android.Runtime.Register("setText", "([CII)V", "")]
public void SetText (char[] text, int start, int len);
[<Android.Runtime.Register("setText", "([CII)V", "")>]
member this.SetText : char[] * int * int -> unit

Parameters

text
Char[]

char array to be displayed

start
Int32

start index in the char array

len
Int32

length of char count after start

Attributes

Remarks

Sets the TextView to display the specified slice of the specified char array. You must promise that you will not change the contents of the array except for right before another call to setText(), since the TextView has no way to know that the text has changed and that it needs to invalidate and re-layout.

Java documentation for android.widget.TextView.setText(char[], int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

SetText(Int32, TextView+BufferType)

Sets the text to be displayed using a string resource identifier.

[Android.Runtime.Register("setText", "(ILandroid/widget/TextView$BufferType;)V", "")]
public void SetText (int resid, Android.Widget.TextView.BufferType? type);
[<Android.Runtime.Register("setText", "(ILandroid/widget/TextView$BufferType;)V", "")>]
member this.SetText : int * Android.Widget.TextView.BufferType -> unit

Parameters

resid
Int32

the resource identifier of the string resource to be displayed

Attributes

Remarks

Java documentation for android.widget.TextView.setText(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

SetText(String, TextView+BufferType)

Sets the text to be displayed using a string resource identifier.

public void SetText (string? text, Android.Widget.TextView.BufferType? type);
member this.SetText : string * Android.Widget.TextView.BufferType -> unit

Parameters

text
String

Remarks

Java documentation for android.widget.TextView.setText(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

SetText(Int32)

Sets the text to be displayed using a string resource identifier.

[Android.Runtime.Register("setText", "(I)V", "")]
public void SetText (int resid);
[<Android.Runtime.Register("setText", "(I)V", "")>]
member this.SetText : int -> unit

Parameters

resid
Int32

the resource identifier of the string resource to be displayed

Attributes

Remarks

Sets the text to be displayed using a string resource identifier.

Java documentation for android.widget.TextView.setText(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

SetText(ICharSequence, TextView+BufferType)

Sets the text to be displayed using a string resource identifier.

[Android.Runtime.Register("setText", "(Ljava/lang/CharSequence;Landroid/widget/TextView$BufferType;)V", "GetSetText_Ljava_lang_CharSequence_Landroid_widget_TextView_BufferType_Handler")]
public virtual void SetText (Java.Lang.ICharSequence? text, Android.Widget.TextView.BufferType? type);
[<Android.Runtime.Register("setText", "(Ljava/lang/CharSequence;Landroid/widget/TextView$BufferType;)V", "GetSetText_Ljava_lang_CharSequence_Landroid_widget_TextView_BufferType_Handler")>]
abstract member SetText : Java.Lang.ICharSequence * Android.Widget.TextView.BufferType -> unit
override this.SetText : Java.Lang.ICharSequence * Android.Widget.TextView.BufferType -> unit

Parameters

Attributes

Remarks

Java documentation for android.widget.TextView.setText(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to