From b12117a03847f8ead4a202c863a0000abe6abd34 Mon Sep 17 00:00:00 2001 From: Dmitry Gladkov Date: Mon, 9 Nov 2015 00:01:21 -0800 Subject: [PATCH] Fix View translations in Android Summary: Fixes regression in bf59864 Closes #3773 Closes https://github.com/facebook/react-native/pull/3954 Reviewed By: svcscm Differential Revision: D2631180 Pulled By: kmagiera fb-gh-sync-id: 09a1a2e48fd6fff37d1491c120a28221cdc1b163 --- .../java/com/facebook/react/uimanager/BaseViewManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java index fbbae4c1b180c1..3107223d3d27d0 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java @@ -115,13 +115,13 @@ public void setScaleY(T view, float scaleY) { @Deprecated @ReactProp(name = PROP_TRANSLATE_X, defaultFloat = 1f) public void setTranslateX(T view, float translateX) { - view.setTranslationX(translateX); + view.setTranslationX(PixelUtil.toPixelFromDIP(translateX)); } @Deprecated @ReactProp(name = PROP_TRANSLATE_Y, defaultFloat = 1f) public void setTranslateY(T view, float translateY) { - view.setTranslationY(translateY); + view.setTranslationY(PixelUtil.toPixelFromDIP(translateY)); } @ReactProp(name = PROP_ACCESSIBILITY_LIVE_REGION)