Udostępnij za pośrednictwem


WindowManagerLayoutParams.BlurBehindRadius Property

Definition

Returns the blur behind radius of the window. -or- Blurs the screen behind the window.

public virtual int BlurBehindRadius { [Android.Runtime.Register("getBlurBehindRadius", "()I", "GetGetBlurBehindRadiusHandler", ApiSince=31)] get; [Android.Runtime.Register("setBlurBehindRadius", "(I)V", "GetSetBlurBehindRadius_IHandler", ApiSince=31)] set; }
[<get: Android.Runtime.Register("getBlurBehindRadius", "()I", "GetGetBlurBehindRadiusHandler", ApiSince=31)>]
[<set: Android.Runtime.Register("setBlurBehindRadius", "(I)V", "GetSetBlurBehindRadius_IHandler", ApiSince=31)>]
member this.BlurBehindRadius : int with get, set

Property Value

Attributes

Remarks

Property getter documentation:

Returns the blur behind radius of the window.

Java documentation for android.view.WindowManager.LayoutParams.getBlurBehindRadius().

Property setter documentation:

Blurs the screen behind the window. The effect is similar to that of #dimAmount, but instead of dimmed, the content behind the window will be blurred (or combined with the dim amount, if such is specified).

The density of the blur is set by the blur radius. The radius defines the size of the neighbouring area, from which pixels will be averaged to form the final color for each pixel. The operation approximates a Gaussian blur. A radius of 0 means no blur. The higher the radius, the denser the blur.

Note the difference with android.view.Window#setBackgroundBlurRadius, which blurs only within the bounds of the window. Blur behind blurs the whole screen behind the window.

Requires #FLAG_BLUR_BEHIND to be set.

Cross-window blur might not be supported by some devices due to GPU limitations. It can also be disabled at runtime, e.g. during battery saving mode, when multimedia tunneling is used or when minimal post processing is requested. In such situations, no blur will be computed or drawn, resulting in there being no depth separation between the window and the content behind it. To avoid this, the app might want to use more #dimAmount on its window. To listen for cross-window blur enabled/disabled events, use #addCrossWindowBlurEnabledListener.

Java documentation for android.view.WindowManager.LayoutParams.setBlurBehindRadius(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to