Switch.SetSwitchTypeface 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| SetSwitchTypeface(Typeface) |
設定開關上文字應顯示的字體。 |
| SetSwitchTypeface(Typeface, TypefaceStyle) |
設定 Switch 上文字應該顯示的字體和樣式,如果你提供的字體沒有你指定的所有樣式,則會在 Paint 中開啟假粗體和斜體位元。 |
SetSwitchTypeface(Typeface)
設定開關上文字應顯示的字體。
[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
參數
- tf
- Typeface
字體
- 屬性
備註
設定開關上文字應顯示的字體。 請注意,並非所有字體家族都有粗體和斜體變體,所以你可能需要用粗 #setSwitchTypeface(Typeface, int) 體來達到你真正想要的外觀。
Java 文件 android.widget.Switch.setSwitchTypeface(android.graphics.Typeface)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
SetSwitchTypeface(Typeface, TypefaceStyle)
設定 Switch 上文字應該顯示的字體和樣式,如果你提供的字體沒有你指定的所有樣式,則會在 Paint 中開啟假粗體和斜體位元。
[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
參數
- tf
- Typeface
字體
- style
- TypefaceStyle
int
- 屬性
備註
設定 Switch 上文字應該顯示的字體和樣式,如果你提供的字體沒有你指定的所有樣式,則會在 Paint 中開啟假粗體和斜體位元。
Java 文件 android.widget.Switch.setSwitchTypeface(android.graphics.Typeface, int)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。