Switch.SetSwitchTypeface Method

Definition

Overloads

SetSwitchTypeface(Typeface)

Sets the typeface in which the text should be displayed on the switch.

SetSwitchTypeface(Typeface, TypefaceStyle)

Sets the typeface and style in which the text should be displayed on the switch, 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.

SetSwitchTypeface(Typeface)

Sets the typeface in which the text should be displayed on the switch.

[Android.Runtime.Register("setSwitchTypeface", "(Landroid/graphics/Typeface;)V", "GetSetSwitchTypeface_Landroid_graphics_Typeface_Handler")]
public virtual void SetSwitchTypeface (Android.Graphics.Typeface? tf);
[<Android.Runtime.Register("setSwitchTypeface", "(Landroid/graphics/Typeface;)V", "GetSetSwitchTypeface_Landroid_graphics_Typeface_Handler")>]
abstract member SetSwitchTypeface : Android.Graphics.Typeface -> unit
override this.SetSwitchTypeface : Android.Graphics.Typeface -> unit

Parameters

Attributes

Remarks

Sets the typeface in which the text should be displayed on the switch. Note that not all Typeface families actually have bold and italic variants, so you may need to use #setSwitchTypeface(Typeface, int) to get the appearance that you actually want.

Java documentation for android.widget.Switch.setSwitchTypeface(android.graphics.Typeface).

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

SetSwitchTypeface(Typeface, TypefaceStyle)

Sets the typeface and style in which the text should be displayed on the switch, 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("setSwitchTypeface", "(Landroid/graphics/Typeface;I)V", "GetSetSwitchTypeface_Landroid_graphics_Typeface_IHandler")]
public virtual void SetSwitchTypeface (Android.Graphics.Typeface? tf, Android.Graphics.TypefaceStyle style);
[<Android.Runtime.Register("setSwitchTypeface", "(Landroid/graphics/Typeface;I)V", "GetSetSwitchTypeface_Landroid_graphics_Typeface_IHandler")>]
abstract member SetSwitchTypeface : Android.Graphics.Typeface * Android.Graphics.TypefaceStyle -> unit
override this.SetSwitchTypeface : Android.Graphics.Typeface * Android.Graphics.TypefaceStyle -> unit

Parameters

Attributes

Remarks

Sets the typeface and style in which the text should be displayed on the switch, 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.Switch.setSwitchTypeface(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