Skip to content

Commit 74a00be

Browse files
mdvaccafacebook-github-bot
authored andcommitted
Enabled View falttening for Android builds
Summary: This diff enables view flattening for Android when using Fabric. Reviewed By: shergin Differential Revision: D10254678 fbshipit-source-id: cc7acaa38a6d01e112ba0e8a92db61cdeefbffee
1 parent 95afdd8 commit 74a00be

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

ReactCommon/fabric/components/view/ViewShadowNode.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,10 @@ namespace react {
1313
const char ViewComponentName[] = "View";
1414

1515
bool ViewShadowNode::isLayoutOnly() const {
16-
#ifdef ANDROID
17-
// This feature is not properly tested on Android yet.
18-
return false;
19-
#else
2016
const auto &viewProps = *std::static_pointer_cast<const ViewProps>(props_);
2117

2218
return
19+
viewProps.collapsable &&
2320
// Event listeners
2421
!viewProps.onLayout &&
2522
// Generic Props
@@ -33,7 +30,6 @@ bool ViewShadowNode::isLayoutOnly() const {
3330
viewProps.transform == Transform{} && viewProps.zIndex == 0 &&
3431
// Layout Metrics
3532
getLayoutMetrics().borderWidth == EdgeInsets{};
36-
#endif
3733
}
3834

3935
} // namespace react

0 commit comments

Comments
 (0)