ShadowsViewGroup
Interface common to all current custom ViewGroups.
The groups are divided into two broad categories: Recycling and Regular.
Recycling groups:
Regular groups:
The groups' main use is to allow the library's shadow properties to be set on Views through layout XML. To that end, they all recognize the following XML attributes that correspond to the interface properties:
app:childShadowsPlaneapp:clipAllChildShadowsapp:childOutlineShadowsColorCompatapp:forceChildOutlineShadowsColorCompatapp:takeOverDrawForInlineChildShadows
The first four are conveniences that allow the same value to be applied to each child View added during initialization.
The last one – takeOverDrawForInlineChildShadows – determines whether the group will take over the draw operations for Inline shadows. By default, Regular groups set this to true, so that all the planes work as expected of the box; Recycling groups set it to false, to avoid modifying the native child routine for groups that redraw rapidly.
To help prevent confusion over the runtime behavior, these groups will set their properties on children only until the group first attaches to a Window. After that, the group's properties can no longer be modified, and any user-added Views will not have any shadow properties set automatically.
The Regular groups recognize the following XML attributes on child elements:
app:shadowPlaneapp:clipOutlineShadowapp:outlineShadowColorCompatapp:forceOutlineShadowColorCompat
The possible XML values correspond to the code values just as one would expect. For example:
<com.zedalpha.shadowgadgets.view.viewgroup.ShadowsFrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
…
app:takeOverDrawForInlineChildShadows="false">
<Button
android:id="@+id/translucent_button"
…
app:shadowPlane="inline"
app:clipOutlineShadow="true"
app:outlineShadowColorCompat="#FF0000"
app:forceOutlineShadowColorCompat="true" />
</com.zedalpha.shadowgadgets.view.viewgroup.ShadowsFrameLayout>For the purposes of consistent behavior across all the different ViewGroup types, these attributes will work properly only on Views with IDs that are unique among their siblings.
Inheritors
Properties
A single color compat value to set on all children added during initialization.
The ShadowPlane to set on all child Views as they're added during initialization.
If true, sets clipOutlineShadow to true on all child Views as they're added during initialization.
If true, sets forceOutlineShadowColorCompat to true on all child Views added during initialization.
Determines whether the group will take over the draw operations for Inline shadows.
Determines whether the group will take over the draw operations for Inline shadows.