Work around nodes touch bug for Groups
Summary: This is a hack to fix the Groups dialog bug so that we can get some real data in production from using Nodes. This should be replaced with a better solution in the near future. Differential Revision: D3016859
This commit is contained in:
Родитель
c75f3b7d9f
Коммит
4d25624a62
|
@ -13,9 +13,9 @@ import javax.annotation.Nullable;
|
|||
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.uimanager.PixelUtil;
|
||||
import com.facebook.react.uimanager.ViewProps;
|
||||
import com.facebook.react.uimanager.annotations.ReactProp;
|
||||
import com.facebook.react.uimanager.annotations.ReactPropGroup;
|
||||
import com.facebook.react.uimanager.ViewProps;
|
||||
|
||||
/* package */ final class RCTView extends FlatShadowNode {
|
||||
|
||||
|
@ -59,6 +59,13 @@ import com.facebook.react.uimanager.ViewProps;
|
|||
|
||||
@Override
|
||||
public void setBackgroundColor(int backgroundColor) {
|
||||
// TODO t10316772 this if statement is a hack - we are mounting any transparent RCTView to an
|
||||
// Android view, which is not necessary (and is inefficent). We're doing this to work around a
|
||||
// bug where a non-Android view won't get touch because a View that is deeper in the hierarchy
|
||||
// (i.e. will get onTouchEvent later) will handle it instead of the higher up view.
|
||||
if (backgroundColor == 0) {
|
||||
forceMountToView();
|
||||
}
|
||||
getMutableBorder().setBackgroundColor(backgroundColor);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче