語言

TextView.SetTextAppearance 方法

定義

多載

名稱 Description
SetTextAppearance(Int32)

設定指定樣式資源的文字外觀。

SetTextAppearance(Context, Int32)
已淘汰.

設定來自指定 TextAppearance 資源的文字色彩、大小、樣式、提示色彩和反白顯示色彩。

SetTextAppearance(Int32)

設定指定樣式資源的文字外觀。

[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

參數

resId
Int32

要套用的樣式的資源識別碼

屬性

備註

設定指定樣式資源的文字外觀。

使用框架定義 TextAppearance 的樣式,例如 android.R.style#TextAppearance_Material_Body1 @android:style/TextAppearance.Material.Body1 或 see android.R.styleable#TextAppearance TextAppearance ,找出可用於自訂樣式的屬性集合。

Java 文件 android.widget.TextView.setTextAppearance(int)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

SetTextAppearance(Context, Int32)

警告

deprecated

設定來自指定 TextAppearance 資源的文字色彩、大小、樣式、提示色彩和反白顯示色彩。

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

參數

context
Context

用於存取應用程式資源與服務的上下文。

resId
Int32

要套用的樣式的資源識別碼

屬性

備註

設定來自指定 TextAppearance 資源的文字色彩、大小、樣式、提示色彩和反白顯示色彩。

此會員已被棄用。 請改用 #setTextAppearance(int)。

Java 文件 android.widget.TextView.setTextAppearance(android.content.Context, int)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於