다음을 통해 공유


Context.IsUiContext 속성

정의

컨텍스트가 UI 구성 요소(예: WindowManagerandroid.view.LayoutInflater LayoutInflaterandroid.app.WallpaperManager WallpaperManager또는 )에 액세스할 수 있는 UI 컨텍스트인지 여부를 반환 true 합니다.

public virtual bool IsUiContext { [Android.Runtime.Register("isUiContext", "()Z", "GetIsUiContextHandler", ApiSince=31)] get; }
[<get: Android.Runtime.Register("isUiContext", "()Z", "GetIsUiContextHandler", ApiSince=31)>]
member this.IsUiContext : bool

속성 값

특성

설명

컨텍스트가 UI 구성 요소(예: WindowManagerandroid.view.LayoutInflater LayoutInflaterandroid.app.WallpaperManager WallpaperManager또는 )에 액세스할 수 있는 UI 컨텍스트인지 여부를 반환 true 합니다. UI가 아닌 컨텍스트에서 UI 구성 요소에 액세스하면 활성화된 경우 android.os.StrictMode.VmPolicy.Builder#detectIncorrectContextUse() throw됩니다android.os.strictmode.Violation.

UI 컨텍스트의 예는 android.app.Activity Activity,에서 #createWindowContext(int, Bundle) 만든 컨텍스트 또는 android.inputmethodservice.InputMethodService InputMethodService

프로그래밍 방식으로 허용되는 경우에도 확인을 무시 android.os.strictmode.IncorrectContextUseViolation 하도록 이 방법을 재정의하는 것은 권장되지 않습니다.

에 대한 android.content.Context.isUiContext()Java 설명서

이 페이지의 일부는 Android 오픈 소스 프로젝트에서 만들고 공유하고 Creative Commons 2.5 특성 라이선스에 설명된 용어에 따라 사용되는 작업을 기반으로 하는 수정 사항입니다.

적용 대상