Context.IsUiContext 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
컨텍스트가 UI 구성 요소(예: WindowManager
android.view.LayoutInflater LayoutInflater
android.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 구성 요소(예: WindowManager
android.view.LayoutInflater LayoutInflater
android.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 특성 라이선스에 설명된 용어에 따라 사용되는 작업을 기반으로 하는 수정 사항입니다.