语言

TextView.GetTextColor(Context, TypedArray, Int32) 方法

定义

从 AttributeSet 返回TextView_textColor属性中的默认颜色(如果已设置)或TextView_textAppearance属性TextAppearance_textColor的默认颜色(如果未直接设置TextView_textColor)。

[Android.Runtime.Register("getTextColor", "(Landroid/content/Context;Landroid/content/res/TypedArray;I)I", "")]
public static int GetTextColor(Android.Content.Context? context, Android.Content.Res.TypedArray? attrs, int def);
[<Android.Runtime.Register("getTextColor", "(Landroid/content/Context;Landroid/content/res/TypedArray;I)I", "")>]
static member GetTextColor : Android.Content.Context * Android.Content.Res.TypedArray * int -> int

参数

context
Context

用于访问应用程序资源和服务的上下文。

attrs
TypedArray

从 XML 提供的属性。

def
Int32

def 值。

返回

获取文本颜色操作的结果。

特性

注解

从 AttributeSet 返回TextView_textColor属性中的默认颜色(如果已设置)或TextView_textAppearance属性TextAppearance_textColor的默认颜色(如果未直接设置TextView_textColor)。

Java文档android.widget.TextView.getTextColor(android.content.Context, android.content.res.TypedArray, int)。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于