Correctly reset pivot when recyling views

Summary:
Calling `setPivotX` and `setPivotY` internally sets `isPivotExplicitlySet` in Android UI, which causes some transforms to no longer use the right transform. Instead use `resetPivot` to get the desired behaviour.

Changelog: [Android][Fixed] Bug with view transforms when view recycling is enabled

Reviewed By: NickGerleman

Differential Revision: D38579267

fbshipit-source-id: 36186286c6765f92aabaa44994546e06f34c2be0
This commit is contained in:
Pieter De Baets 2022-08-11 02:36:44 -07:00 коммит произвёл Facebook GitHub Bot
Родитель 1e48274223
Коммит e0be14a310
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -92,8 +92,7 @@ public abstract class BaseViewManager<T extends View, C extends LayoutShadowNode
setTransform(view, null);
// RenderNode params not covered by setTransform above
view.setPivotX(0);
view.setPivotY(0);
view.resetPivot();
view.setTop(0);
view.setBottom(0);
view.setLeft(0);