mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix missing setLeftTopRightBottom method (#44033)
Summary: We were seeing errors due to `setLeftTopRightBottom` being called without a check for the Android version despite that method [being added in Android API level 29](https://developer.android.com/reference/android/view/View#setLeftTopRightBottom(int,%20int,%20int,%20int)). I've replaced it with the older API methods to fix the issue. This issue originates from https://github.com/facebook/react-native/pull/38526 ## Changelog: [ANDROID] [FIXED] - Resolved error "No virtual method setLeftTopRightBottom" Pull Request resolved: https://github.com/facebook/react-native/pull/44033 Test Plan: Change is pretty trivial, but we tested it in our production app ([Tarteel](https://www.tarteel.ai/)) for a week and confirmed that the error is resolved. Reviewed By: cortinico Differential Revision: D56002098 Pulled By: NickGerleman fbshipit-source-id: ff97d0be2703006b14c865dd148e40eb10069acb
This commit is contained in:
committed by
Facebook GitHub Bot
parent
44d59ea6f9
commit
08ecdee71c
+4
-1
@@ -50,7 +50,10 @@ public class ReactHorizontalScrollContainerView extends ReactViewGroup {
|
||||
int newLeft = 0;
|
||||
int width = right - left;
|
||||
int newRight = newLeft + width;
|
||||
setLeftTopRightBottom(newLeft, top, newRight, bottom);
|
||||
setLeft(newLeft);
|
||||
setTop(top);
|
||||
setRight(newRight);
|
||||
setBottom(bottom);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user