-
Notifications
You must be signed in to change notification settings - Fork 5
Multi–property update
Package: com.zedalpha.shadowgadgets.view
Helper functions for modifying multiple library shadow properties simultaneously.
(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.
This function should always be used where applicable whenever setting
ShadowGadgets.throwOnUnhandledErrors
to true, in order to avoid ShadowExceptions
from invalid intermediate states.
(docs)
public fun View.resetShadow()A convenience that resets all the properties of a target's library shadow, effectively disabling it and restoring the native, presumably broken draw. Mainly meant for testing and debugging.
The demo app uses updateShadow() in the ViewRootTopic
class.
Please report broken links and any other wiki issues here.