mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-04 22:56:32 +08:00
Clip all views when removing clipping subviews, rather than just FlatViewGroup views.
Summary: Currently only FlatViewGroup children were clipped, rather than all offscreen Android views. Reviewed By: ahmedre Differential Revision: D3462002
This commit is contained in:
committed by
Ahmed El-Helw
parent
241fd0869d
commit
88dfd75aa7
@@ -148,8 +148,8 @@ import com.facebook.react.uimanager.ViewManagerRegistry;
|
||||
if (view instanceof FlatViewGroup) {
|
||||
FlatViewGroup flatViewGroup = (FlatViewGroup) view;
|
||||
if (flatViewGroup.getRemoveClippedSubviews()) {
|
||||
Collection<FlatViewGroup> detachedViews = flatViewGroup.getDetachedViews();
|
||||
for (FlatViewGroup detachedChild : detachedViews) {
|
||||
Collection<View> detachedViews = flatViewGroup.getDetachedViews();
|
||||
for (View detachedChild : detachedViews) {
|
||||
// we can do super here because removeClippedSubviews is currently not recursive. if/when
|
||||
// we become recursive one day, this should call vanilla dropView to be recursive as well.
|
||||
super.dropView(detachedChild);
|
||||
|
||||
Reference in New Issue
Block a user