public interface ReactClippingViewGroup
View
subclasses that support
removeClippedSubviews
property. When this property is set for the ViewGroup
subclass it's responsible for detaching it's child views that are clipped by the view boundaries.
Those view boundaries should be determined based on it's parent clipping area and current view's
offset in parent and doesn't necessarily reflect the view visible area (in a sense of a value
that View.getGlobalVisibleRect(android.graphics.Rect, android.graphics.Point)
may return). In order to determine the clipping rect for
current view helper method ReactClippingViewGroupHelper.calculateClippingRect(android.view.View, android.graphics.Rect)
can be used
that takes into account parent view settings.Modifier and Type | Method and Description |
---|---|
void |
getClippingRect(android.graphics.Rect outClippingRect)
Get rectangular bounds to which view is currently clipped to.
|
boolean |
getRemoveClippedSubviews()
Get the current value of
removeClippedSubviews property. |
void |
setRemoveClippedSubviews(boolean removeClippedSubviews)
Sets property
removeClippedSubviews as a result of property update in JS. |
void |
updateClippingRect()
Notify view that clipping area may have changed and it should recalculate the list of children
that should be attached/detached.
|
void updateClippingRect()
removeClippedSubviews
is set to true
on a view.
CAUTION: Views are responsible for calling updateClippingRect()
on it's children. This
should happen if child implement ReactClippingViewGroup
, return true from
getRemoveClippedSubviews()
and clipping rect change of the current view may affect
clipping rect of this child.void getClippingRect(android.graphics.Rect outClippingRect)
removeCLippedSubviews
property value to true
.outClippingRect
- output clipping rect should be written to this object.void setRemoveClippedSubviews(boolean removeClippedSubviews)
removeClippedSubviews
as a result of property update in JS. Should be
called only from @{link ViewManager#updateView} method.
Helper method ReactClippingViewGroupHelper#applyRemoveClippedSubviewsProperty
may be
used by ViewManager
subclass to apply this property based on property update map
ReactStylesDiffMap
.boolean getRemoveClippedSubviews()
removeClippedSubviews
property.