TextClock 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| TextClock(Context) |
使用当前区域设置的默认模式创建新时钟。 |
| TextClock(Context, IAttributeSet) |
创建从 XML 膨胀的新时钟。 |
| TextClock(IntPtr, JniHandleOwnership) |
创建 JNI 对象的托管表示形式时使用的构造函数;由运行时调用。 |
| TextClock(Context, IAttributeSet, Int32) |
创建从 XML 膨胀的新时钟。 |
| TextClock(Context, IAttributeSet, Int32, Int32) |
使用当前区域设置的默认模式创建新时钟。 |
TextClock(Context)
使用当前区域设置的默认模式创建新时钟。
[Android.Runtime.Register(".ctor", "(Landroid/content/Context;)V", "")]
public TextClock(Android.Content.Context? context);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;)V", "")>]
new Android.Widget.TextClock : Android.Content.Context -> Android.Widget.TextClock
参数
- context
- Context
视图正在运行的上下文,通过该上下文可以访问当前主题、资源等。
- 属性
注解
使用当前区域设置的默认模式创建新时钟。
Java文档android.widget.TextClock.TextClock(android.content.Context)。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
TextClock(Context, IAttributeSet)
创建从 XML 膨胀的新时钟。
[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;)V", "")]
public TextClock(Android.Content.Context? context, Android.Util.IAttributeSet? attrs);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;)V", "")>]
new Android.Widget.TextClock : Android.Content.Context * Android.Util.IAttributeSet -> Android.Widget.TextClock
参数
- context
- Context
视图正在运行的上下文,通过该上下文可以访问当前主题、资源等。
- attrs
- IAttributeSet
正在膨胀视图的 XML 标记的属性
- 属性
注解
创建从 XML 膨胀的新时钟。 此对象的属性从 XML 中指定的属性进行初始化。
此构造函数使用默认样式 0,因此应用的唯一属性值是上下文的主题和给定 AttributeSet 中的属性值。
Java文档android.widget.TextClock.TextClock(android.content.Context, android.util.AttributeSet)。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
TextClock(IntPtr, JniHandleOwnership)
创建 JNI 对象的托管表示形式时使用的构造函数;由运行时调用。
protected TextClock(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Widget.TextClock : nativeint * Android.Runtime.JniHandleOwnership -> Android.Widget.TextClock
参数
- transfer
- JniHandleOwnership
指示 JniHandleOwnership如何处理 javaReference
注解
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
TextClock(Context, IAttributeSet, Int32)
创建从 XML 膨胀的新时钟。
[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;I)V", "")]
public TextClock(Android.Content.Context? context, Android.Util.IAttributeSet? attrs, int defStyleAttr);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;I)V", "")>]
new Android.Widget.TextClock : Android.Content.Context * Android.Util.IAttributeSet * int -> Android.Widget.TextClock
参数
- context
- Context
视图正在运行的上下文,通过该上下文可以访问当前主题、资源等。
- attrs
- IAttributeSet
正在膨胀视图的 XML 标记的属性
- defStyleAttr
- Int32
当前主题中的一个属性,该属性包含对样式资源的引用,该资源提供视图的默认值。 可以是 0,无法查找默认值。
- 属性
注解
创建从 XML 膨胀的新时钟。 此对象的属性从 XML 中指定的属性进行初始化。
Java文档android.widget.TextClock.TextClock(android.content.Context, android.util.AttributeSet, int)。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
TextClock(Context, IAttributeSet, Int32, Int32)
使用当前区域设置的默认模式创建新时钟。
[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;II)V", "")]
public TextClock(Android.Content.Context? context, Android.Util.IAttributeSet? attrs, int defStyleAttr, int defStyleRes);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;II)V", "")>]
new Android.Widget.TextClock : Android.Content.Context * Android.Util.IAttributeSet * int * int -> Android.Widget.TextClock
参数
- context
- Context
视图正在运行的上下文,通过该上下文可以访问当前主题、资源等。
- attrs
- IAttributeSet
- defStyleAttr
- Int32
- defStyleRes
- Int32
- 属性
注解
Java文档android.widget.TextClock.TextClock(android.content.Context)。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。