MultiLightEffect.Builder.SetPreemptive(Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets whether this effect will preempt any previous effect / state currently active on the light.
[Android.Runtime.Register("setPreemptive", "(Z)Landroid/hardware/lights/MultiLightEffect$Builder;", "", ApiSince=37)]
public Android.Hardware.Lights.MultiLightEffect.Builder SetPreemptive(bool preemptive);
[<Android.Runtime.Register("setPreemptive", "(Z)Landroid/hardware/lights/MultiLightEffect$Builder;", "", ApiSince=37)>]
member this.SetPreemptive : bool -> Android.Hardware.Lights.MultiLightEffect.Builder
Parameters
- preemptive
- Boolean
true to preempt the previous light state; false to wait for the current effect to finish, or for the current iteration of an infinite effect to finish.
Returns
This builder with the preemption option set.
- Attributes
Remarks
Sets whether this effect will preempt any previous effect / state currently active on the light.
By default, the builder sets this value to true and the effect is preemptive.
These playback rules apply when the session controls all the lights required by the effect. See SetEffect(MultiLightEffect) for how higher-priority sessions affect playback.
When preemption is disabled, playback starts immediately if the previous state is a permanent color. Otherwise, it starts after all iterations of a finite effect, or after the current iteration of an infinite effect.
A preemptive effect is applied immediately, but its first control point can occur later. Interpolation can start from the last known color or the last interpolated value of the previous effect.
A light session can queue one non-preemptive effect. A later non-preemptive request replaces an earlier effect waiting in that queue.
Android reference for android.hardware.lights.MultiLightEffect.Builder.setPreemptive.
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.