Freigeben über


TextView.SetTextAppearance Method

Definition

Overloads

SetTextAppearance(Int32)

Sets the text appearance from the specified style resource.

SetTextAppearance(Context, Int32)

Sets the text color, size, style, hint color, and highlight color from the specified TextAppearance resource.

SetTextAppearance(Int32)

Sets the text appearance from the specified style resource.

[Android.Runtime.Register("setTextAppearance", "(I)V", "GetSetTextAppearance_IHandler", ApiSince=23)]
public virtual void SetTextAppearance (int resId);
[<Android.Runtime.Register("setTextAppearance", "(I)V", "GetSetTextAppearance_IHandler", ApiSince=23)>]
abstract member SetTextAppearance : int -> unit
override this.SetTextAppearance : int -> unit

Parameters

resId
Int32

the resource identifier of the style to apply

Attributes

Remarks

Sets the text appearance from the specified style resource.

Use a framework-defined TextAppearance style like android.R.style#TextAppearance_Material_Body1 @android:style/TextAppearance.Material.Body1 or see android.R.styleable#TextAppearance TextAppearance for the set of attributes that can be used in a custom style.

Java documentation for android.widget.TextView.setTextAppearance(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

SetTextAppearance(Context, Int32)

Sets the text color, size, style, hint color, and highlight color from the specified TextAppearance resource.

[Android.Runtime.Register("setTextAppearance", "(Landroid/content/Context;I)V", "GetSetTextAppearance_Landroid_content_Context_IHandler")]
public virtual void SetTextAppearance (Android.Content.Context? context, int resId);
[<Android.Runtime.Register("setTextAppearance", "(Landroid/content/Context;I)V", "GetSetTextAppearance_Landroid_content_Context_IHandler")>]
abstract member SetTextAppearance : Android.Content.Context * int -> unit
override this.SetTextAppearance : Android.Content.Context * int -> unit

Parameters

context
Context
resId
Int32

the resource identifier of the style to apply

Attributes

Remarks

Sets the text color, size, style, hint color, and highlight color from the specified TextAppearance resource.

This member is deprecated. Use #setTextAppearance(int) instead.

Java documentation for android.widget.TextView.setTextAppearance(android.content.Context, 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