語言

TextView.GetTextColors(Context, TypedArray) 方法

定義

若設定為 TypedArray,則回傳 TypedArray 的 TextView_textColor 屬性;若 TextView_textColor 未直接設定,則回傳 TextView_textAppearance 屬性的 TextAppearance_textColor。

[Android.Runtime.Register("getTextColors", "(Landroid/content/Context;Landroid/content/res/TypedArray;)Landroid/content/res/ColorStateList;", "")]
public static Android.Content.Res.ColorStateList? GetTextColors(Android.Content.Context? context, Android.Content.Res.TypedArray? attrs);
[<Android.Runtime.Register("getTextColors", "(Landroid/content/Context;Landroid/content/res/TypedArray;)Landroid/content/res/ColorStateList;", "")>]
static member GetTextColors : Android.Content.Context * Android.Content.Res.TypedArray -> Android.Content.Res.ColorStateList

參數

context
Context

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

attrs
TypedArray

屬性則由 XML 提供。

傳回

取得文字顏色操作的結果。

屬性

備註

若設定為 TypedArray,則回傳 TypedArray 的 TextView_textColor 屬性;若 TextView_textColor 未直接設定,則回傳 TextView_textAppearance 屬性的 TextAppearance_textColor。

Java 文件 android.widget.TextView.getTextColors(android.content.Context, android.content.res.TypedArray)。

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

適用於