Share via


TextView.SetTypeface(Typeface, TypefaceStyle) Method

Definition

Sets the typeface and style in which the text should be displayed, and turns on the fake bold and italic bits in the Paint if the Typeface that you provided does not have all the bits in the style that you specified.

[Android.Runtime.Register("setTypeface", "(Landroid/graphics/Typeface;I)V", "GetSetTypeface_Landroid_graphics_Typeface_IHandler")]
public virtual void SetTypeface (Android.Graphics.Typeface? tf, Android.Graphics.TypefaceStyle style);
[<Android.Runtime.Register("setTypeface", "(Landroid/graphics/Typeface;I)V", "GetSetTypeface_Landroid_graphics_Typeface_IHandler")>]
abstract member SetTypeface : Android.Graphics.Typeface * Android.Graphics.TypefaceStyle -> unit
override this.SetTypeface : Android.Graphics.Typeface * Android.Graphics.TypefaceStyle -> unit

Parameters

Attributes

Remarks

Sets the typeface and style in which the text should be displayed, and turns on the fake bold and italic bits in the Paint if the Typeface that you provided does not have all the bits in the style that you specified.

Java documentation for android.widget.TextView.setTypeface(android.graphics.Typeface, 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