mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Support ScrollAway in ReactScrollView
Summary: Support ScrollAway in ReactScrollView for Fabric/non-Fabric. Changelog: [Android][Added] Support for ScrollAway native nav bars added to ReactScrollView Reviewed By: mdvacca Differential Revision: D28308855 fbshipit-source-id: 9a922159ef50fb7c8e9c484a4b97ca57ab248496
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d87542ee4c
commit
0ef5beee85
+5
-1
@@ -43,12 +43,16 @@ public class ReactClippingViewGroupHelper {
|
||||
// Intersect the view with the parent's rectangle
|
||||
// This will result in the overlap with coordinates in the parent space
|
||||
if (!sHelperRect.intersect(
|
||||
view.getLeft(), view.getTop(), view.getRight(), view.getBottom())) {
|
||||
view.getLeft(),
|
||||
view.getTop() + (int) view.getTranslationY(),
|
||||
view.getRight(),
|
||||
view.getBottom() + (int) view.getTranslationY())) {
|
||||
outputRect.setEmpty();
|
||||
return;
|
||||
}
|
||||
// Now we move the coordinates to the View's coordinate space
|
||||
sHelperRect.offset(-view.getLeft(), -view.getTop());
|
||||
sHelperRect.offset(-(int) view.getTranslationX(), -(int) view.getTranslationY());
|
||||
sHelperRect.offset(view.getScrollX(), view.getScrollY());
|
||||
outputRect.set(sHelperRect);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user