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
This commit is contained in:
parent
714d452a72
commit
b12117a038
|
@ -115,13 +115,13 @@ public abstract class BaseViewManager<T extends View, C extends LayoutShadowNode
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@ReactProp(name = PROP_TRANSLATE_X, defaultFloat = 1f)
|
@ReactProp(name = PROP_TRANSLATE_X, defaultFloat = 1f)
|
||||||
public void setTranslateX(T view, float translateX) {
|
public void setTranslateX(T view, float translateX) {
|
||||||
view.setTranslationX(translateX);
|
view.setTranslationX(PixelUtil.toPixelFromDIP(translateX));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@ReactProp(name = PROP_TRANSLATE_Y, defaultFloat = 1f)
|
@ReactProp(name = PROP_TRANSLATE_Y, defaultFloat = 1f)
|
||||||
public void setTranslateY(T view, float translateY) {
|
public void setTranslateY(T view, float translateY) {
|
||||||
view.setTranslationY(translateY);
|
view.setTranslationY(PixelUtil.toPixelFromDIP(translateY));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ReactProp(name = PROP_ACCESSIBILITY_LIVE_REGION)
|
@ReactProp(name = PROP_ACCESSIBILITY_LIVE_REGION)
|
||||||
|
|
Loading…
Reference in New Issue