TextAppearanceSpan 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| TextAppearanceSpan(Parcel) |
从保存的包裹状态创建一个 |
| TextAppearanceSpan(Context, Int32) |
使用指定的 TextAppearance 资源来确定文本外观。 |
| TextAppearanceSpan(IntPtr, JniHandleOwnership) |
创建 JNI 对象的托管表示形式时使用的构造函数;由运行时调用。 |
| TextAppearanceSpan(Context, Int32, Int32) |
使用指定的 TextAppearance 资源来确定文本外观,使用指定的文本颜色资源来确定颜色。 |
| TextAppearanceSpan(String, TypefaceStyle, Int32, ColorStateList, ColorStateList) |
使用指定的字样、大小、样式和颜色绘制文本。 |
TextAppearanceSpan(Parcel)
从保存的包裹状态创建一个 TextAppearanceSpan 。
[Android.Runtime.Register(".ctor", "(Landroid/os/Parcel;)V", "")]
public TextAppearanceSpan(Android.OS.Parcel? src);
[<Android.Runtime.Register(".ctor", "(Landroid/os/Parcel;)V", "")>]
new Android.Text.Style.TextAppearanceSpan : Android.OS.Parcel -> Android.Text.Style.TextAppearanceSpan
参数
- src
- Parcel
从中读取跨度保存状态的包裹。
- 特性
注解
Java文档android.text.style.TextAppearanceSpan.TextAppearanceSpan(android.os.Parcel)。
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。
适用于
TextAppearanceSpan(Context, Int32)
使用指定的 TextAppearance 资源来确定文本外观。
[Android.Runtime.Register(".ctor", "(Landroid/content/Context;I)V", "")]
public TextAppearanceSpan(Android.Content.Context? context, int appearance);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;I)V", "")>]
new Android.Text.Style.TextAppearanceSpan : Android.Content.Context * int -> Android.Text.Style.TextAppearanceSpan
参数
- context
- Context
用于解析文本外观和主题资源的上下文。
- appearance
- Int32
文本外观样式的资源 ID。
- 特性
注解
使用指定的 TextAppearance 资源来确定文本外观。 例如,appearance应为 .android.R.style.TextAppearance_Small
Java文档android.text.style.TextAppearanceSpan.TextAppearanceSpan(android.content.Context, int)。
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。
适用于
TextAppearanceSpan(IntPtr, JniHandleOwnership)
创建 JNI 对象的托管表示形式时使用的构造函数;由运行时调用。
protected TextAppearanceSpan(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Text.Style.TextAppearanceSpan : nativeint * Android.Runtime.JniHandleOwnership -> Android.Text.Style.TextAppearanceSpan
参数
- transfer
- JniHandleOwnership
指示 JniHandleOwnership如何处理 javaReference
注解
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。
适用于
TextAppearanceSpan(Context, Int32, Int32)
使用指定的 TextAppearance 资源来确定文本外观,使用指定的文本颜色资源来确定颜色。
[Android.Runtime.Register(".ctor", "(Landroid/content/Context;II)V", "")]
public TextAppearanceSpan(Android.Content.Context? context, int appearance, int colorList);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;II)V", "")>]
new Android.Text.Style.TextAppearanceSpan : Android.Content.Context * int * int -> Android.Text.Style.TextAppearanceSpan
参数
- context
- Context
用于解析文本外观和主题资源的上下文。
- appearance
- Int32
文本外观样式的资源 ID。
- colorList
- Int32
用于替代文本颜色或负值的主题颜色状态列表属性的索引,以保留外观的文本颜色。
- 特性
注解
使用指定的 TextAppearance 资源来确定文本外观,使用指定的文本颜色资源来确定颜色。 例如,appearance应android.R.style.TextAppearance_Small为 ,并且colorList应为android.R.styleable.Theme_textColorPrimary例如。
Java文档android.text.style.TextAppearanceSpan.TextAppearanceSpan(android.content.Context, int, int)。
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。
适用于
TextAppearanceSpan(String, TypefaceStyle, Int32, ColorStateList, ColorStateList)
使用指定的字样、大小、样式和颜色绘制文本。
[Android.Runtime.Register(".ctor", "(Ljava/lang/String;IILandroid/content/res/ColorStateList;Landroid/content/res/ColorStateList;)V", "")]
public TextAppearanceSpan(string? family, Android.Graphics.TypefaceStyle style, int size, Android.Content.Res.ColorStateList? color, Android.Content.Res.ColorStateList? linkColor);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;IILandroid/content/res/ColorStateList;Landroid/content/res/ColorStateList;)V", "")>]
new Android.Text.Style.TextAppearanceSpan : string * Android.Graphics.TypefaceStyle * int * Android.Content.Res.ColorStateList * Android.Content.Res.ColorStateList -> Android.Text.Style.TextAppearanceSpan
参数
- family
- String
字体系列名称,或 null 将家庭保留为未指定。
- style
- TypefaceStyle
要应用的字样样式。
- size
- Int32
文本大小(以像素为单位)。 不正的值使油漆的大小保持不变。
- color
- ColorStateList
文本颜色状态列表,或 null 保留文本颜色不变。
- linkColor
- ColorStateList
链接颜色状态列表,或 null 保留链接颜色不变。
- 特性
注解
使用指定的字样、大小、样式和颜色绘制文本。
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。