Skip to content

Shadow update

zed-alpha edited this page May 10, 2026 · 1 revision

Package: com.zedalpha.shadowgadgets.view


Helper functions for modifying multiple library shadow properties simultaneously.


View.updateShadow

(docs)

public fun View.updateShadow(block: View.() -> Unit)

An update function that takes a lambda in which multiple shadow properties can be modified while minimizing the internal operations that the library must perform. This is especially useful in recycling Adapters that modify multiple shadow properties.

View.resetShadow

(docs)

public fun View.resetShadow()

A convenience that resets all of the properties of a target's library shadow, effectively disabling it and restoring the native, presumably broken one. Mainly meant for testing and debugging.


Examples

The demo app uses updateShadow() in the ViewRootTopic class.

Clone this wiki locally