-
Notifications
You must be signed in to change notification settings - Fork 5
ShadowGadgets
Package: com.zedalpha.shadowgadgets.view
(docs)
public object ShadowGadgetsA helper object to hold properties and other miscellanea that affect the library as a whole.
(docs)
public val isPrimaryDrawMethodAvailable: BooleanIndicates whether the library is able to use the primary draw method in the current environment.
(docs)
public val isPrimaryDrawMethodEnabled: BooleanIndicates whether the library is using the primary draw method.
Shadows are assigned a method during their initializations, so this value does not necessarily mean that all current shadows are using the same method. If this is toggled at runtime, the shadows must be as well.
This is affected by forceFallbackDrawMethod; i.e., if that is true, this
is false, regardless of isPrimaryDrawMethodAvailable's value.
(docs)
public var forceFallbackDrawMethod: Boolean = falseForces the library to use the fallback draw method, for easy testing and debugging.
Normally, the fallback method is used only on API levels 21..28 if the library is unable to access the (hidden) classes and methods for the primary method in the current environment.
(docs)
public var throwOnUnhandledErrors: Boolean = falseThe library is now pro-Exception in lieu of failing silently, but that's a
hefty change to drop suddenly, so it will sit behind this flag for the time
being. This should be set as early as possible, like in an Application
subclass, as is shown in the example linked below.
When this is true, known error states will throw
ShadowExceptions if the target View has no
doOnShadowModeChange handler set. If it
does, it's assumed that ShadowMode.Errors will be handled there.
(docs)
public var suppressLogs: Boolean = falseThis turns off debug logs for known error states. There are no release logs.
The demo app's DemoApplication has examples of enabling
throwOnUnhandledErrors and forceFallbackDrawMethod.