Sprache

LightsRequest.Builder.SetEffect(MultiLightEffect) Method

Definition

Applies an effect to a set of lights configured in the effect object.

[Android.Runtime.Register("setEffect", "(Landroid/hardware/lights/MultiLightEffect;)Landroid/hardware/lights/LightsRequest$Builder;", "", ApiSince=37)]
public Android.Hardware.Lights.LightsRequest.Builder SetEffect(Android.Hardware.Lights.MultiLightEffect effect);
[<Android.Runtime.Register("setEffect", "(Landroid/hardware/lights/MultiLightEffect;)Landroid/hardware/lights/LightsRequest$Builder;", "", ApiSince=37)>]
member this.SetEffect : Android.Hardware.Lights.MultiLightEffect -> Android.Hardware.Lights.LightsRequest.Builder

Parameters

effect
MultiLightEffect

the light effect ot add to the request. This value cannot be null.

Returns

Attributes

Remarks

Applies an effect to a set of lights configured in the effect object.

The system allows a maximum of one effect playing per session plus an additional slot for a non-preemptive effect waiting to be played, which means applications must combine all light effects in to a single MultiLightEffect to play animations with multiple lights.

If another session with higher priority is currently using a light needed by this effect, the effect will not play until the current session has control of all the lights it needs for playback. In a similar way, if the effect is playing and this or another session with higher priority requests a light needed by this effect, the effect will stop playing as if it was preempted.

Android reference for android.hardware.lights.LightsRequest.Builder.setEffect.

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