Files
react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactClippingProhibitedView.java
T
Andres Suarez 8bd3edec88 Update copyright headers from Facebook to Meta
Reviewed By: aaronabramov

Differential Revision: D33367752

fbshipit-source-id: 4ce94d184485e5ee0a62cf67ad2d3ba16e285c8f
2021-12-30 15:11:21 -08:00

27 lines
1.2 KiB
Java

/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
package com.facebook.react.uimanager;
/**
* Some Views may not function if added directly to a ViewGroup that clips them. For example, TTRC
* markers may rely on `onDraw` functionality to work properly, and will break if they're clipped
* out of the View hierarchy for any resaon.
*
* <p>This situation can occur more often in Fabric with View Flattening. We may prevent this sort
* of View Flattening from occurring in the future, but the connection is not entirely certain.
*
* <p>This can occur either because ReactViewGroup clips them out, using the ordinarary subview
* clipping feature. It is also possible if a View is added directly to a ReactRootView below the
* fold of the screen.
*
* <p>Generally the solution is to prevent View flattening in JS by adding `collapsable=false` to a
* parent component of the clipped view, and/or move the View higher up in the hierarchy so it is
* always rendered within the first page of the screen.
*/
public interface ReactClippingProhibitedView {}