语言

AlertDialog.Builder.Context 属性

定义

返回一个 Context 具有此生成器创建的对话框的相应主题。

public virtual Android.Content.Context Context { [Android.Runtime.Register("getContext", "()Landroid/content/Context;", "GetGetContextHandler")] get; }
[<get: Android.Runtime.Register("getContext", "()Landroid/content/Context;", "GetGetContextHandler")>]
member this.Context : Android.Content.Context

属性值

生成的对话的上下文。

特性

注解

返回一个上下文,其中包含此生成器创建的对话框的相应主题。 应用程序应使用此上下文获取 LayoutInflaters 以获取将在生成的对话框中使用的膨胀视图,因为它将导致视图膨胀为正确的主题。

Android 参考。android.app.AlertDialog.Builder.getContext

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

适用于