From 549aaa8218dd7253849fa7cae6a6a65488c564d4 Mon Sep 17 00:00:00 2001 From: Hamdi Wanis Date: Fri, 21 Sep 2018 12:52:27 +0200 Subject: [PATCH] feat: Add 3d rotaion (#126) * feat: Add 3d rotaion * feat: add 3d rotation * feat: add 3d rotation --- .../org/nativescript/widgets/ViewHelper.java | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/android/widgets/src/main/java/org/nativescript/widgets/ViewHelper.java b/android/widgets/src/main/java/org/nativescript/widgets/ViewHelper.java index bb3b63b44..0214b02ca 100644 --- a/android/widgets/src/main/java/org/nativescript/widgets/ViewHelper.java +++ b/android/widgets/src/main/java/org/nativescript/widgets/ViewHelper.java @@ -465,6 +465,26 @@ public class ViewHelper { view.setRotation(value); } + public static float getRotateX(android.view.View view) { + return view.getRotationX(); + } + + public static void setRotateX(android.view.View view, float value) { + view.setRotationX(value); + } + + public static float getRotateY(android.view.View view) { + return view.getRotationY(); + } + + public static void setRotateY(android.view.View view, float value) { + view.setRotationY(value); + } + + public static void setPerspective(android.view.View view, float value) { + view.setCameraDistance(value); + } + public static float getScaleX(android.view.View view) { return view.getScaleX(); } @@ -529,4 +549,4 @@ public class ViewHelper { } } } - \ No newline at end of file +