Share via


IWindowManager.AddCrossWindowBlurEnabledListener Method

Definition

Overloads

AddCrossWindowBlurEnabledListener(IConsumer)

Adds a listener, which will be called when cross-window blurs are enabled/disabled at runtime.

AddCrossWindowBlurEnabledListener(IExecutor, IConsumer)

Adds a listener, which will be called when cross-window blurs are enabled/disabled at runtime.

AddCrossWindowBlurEnabledListener(IConsumer)

Adds a listener, which will be called when cross-window blurs are enabled/disabled at runtime.

[Android.Runtime.Register("addCrossWindowBlurEnabledListener", "(Ljava/util/function/Consumer;)V", "GetAddCrossWindowBlurEnabledListener_Ljava_util_function_Consumer_Handler:Android.Views.IWindowManager, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=31)]
public virtual void AddCrossWindowBlurEnabledListener (Java.Util.Functions.IConsumer listener);
[<Android.Runtime.Register("addCrossWindowBlurEnabledListener", "(Ljava/util/function/Consumer;)V", "GetAddCrossWindowBlurEnabledListener_Ljava_util_function_Consumer_Handler:Android.Views.IWindowManager, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=31)>]
abstract member AddCrossWindowBlurEnabledListener : Java.Util.Functions.IConsumer -> unit
override this.AddCrossWindowBlurEnabledListener : Java.Util.Functions.IConsumer -> unit

Parameters

listener
IConsumer

the listener to be added. It will be called back with a boolean parameter, which is true if cross-window blur is enabled and false if it is disabled

Attributes

Remarks

Adds a listener, which will be called when cross-window blurs are enabled/disabled at runtime. This affects both window blur behind (see LayoutParams#setBlurBehindRadius) and window background blur (see Window#setBackgroundBlurRadius).

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, so the blur target area will not be blurred. To handle this, the app might want to change its theme to one that does not use blurs.

The listener will be called on the main thread.

If the listener is added successfully, it will be called immediately with the current cross-window blur enabled state.

Java documentation for android.view.WindowManager.addCrossWindowBlurEnabledListener(java.util.function.Consumer<java.lang.Boolean>).

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

AddCrossWindowBlurEnabledListener(IExecutor, IConsumer)

Adds a listener, which will be called when cross-window blurs are enabled/disabled at runtime.

[Android.Runtime.Register("addCrossWindowBlurEnabledListener", "(Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "GetAddCrossWindowBlurEnabledListener_Ljava_util_concurrent_Executor_Ljava_util_function_Consumer_Handler:Android.Views.IWindowManager, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=31)]
public virtual void AddCrossWindowBlurEnabledListener (Java.Util.Concurrent.IExecutor executor, Java.Util.Functions.IConsumer listener);
[<Android.Runtime.Register("addCrossWindowBlurEnabledListener", "(Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "GetAddCrossWindowBlurEnabledListener_Ljava_util_concurrent_Executor_Ljava_util_function_Consumer_Handler:Android.Views.IWindowManager, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=31)>]
abstract member AddCrossWindowBlurEnabledListener : Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit
override this.AddCrossWindowBlurEnabledListener : Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit

Parameters

executor
IExecutor

Executor to handle the listener callback

listener
IConsumer

the listener to be added. It will be called back with a boolean parameter, which is true if cross-window blur is enabled and false if it is disabled

Attributes

Remarks

Adds a listener, which will be called when cross-window blurs are enabled/disabled at runtime. This affects both window blur behind (see LayoutParams#setBlurBehindRadius) and window background blur (see Window#setBackgroundBlurRadius).

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, so the blur target area will not be blurred. To handle this, the app might want to change its theme to one that does not use blurs.

If the listener is added successfully, it will be called immediately with the current cross-window blur enabled state.

Java documentation for android.view.WindowManager.addCrossWindowBlurEnabledListener(java.util.concurrent.Executor, java.util.function.Consumer<java.lang.Boolean>).

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