语言

LayoutInflater.CloneInContext(Context) 方法

定义

创建现有 LayoutInflater 对象的副本,复制指向与原始上下文不同的上下文。

[Android.Runtime.Register("cloneInContext", "(Landroid/content/Context;)Landroid/view/LayoutInflater;", "GetCloneInContext_Landroid_content_Context_Handler")]
public abstract Android.Views.LayoutInflater? CloneInContext(Android.Content.Context? newContext);
[<Android.Runtime.Register("cloneInContext", "(Landroid/content/Context;)Landroid/view/LayoutInflater;", "GetCloneInContext_Landroid_content_Context_Handler")>]
abstract member CloneInContext : Android.Content.Context -> Android.Views.LayoutInflater

参数

newContext
Context

要与新 LayoutInflater 关联的新上下文。 如果需要,可能与原始上下文相同。

返回

返回与给定上下文关联的新 LayoutInflater 对象的品牌跨度。

特性

注解

创建现有 LayoutInflater 对象的副本,复制指向与原始上下文不同的上下文。 这用于 ContextThemeWrapper 创建新的 LayoutInflater,以配合新的上下文主题。

适用于 . 的 android.view.LayoutInflater.cloneInContext(android.content.Context)Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于