michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: package org.mozilla.gecko.animation; michael@0: michael@0: import android.view.View; michael@0: michael@0: public final class ViewHelper { michael@0: private ViewHelper() { michael@0: } michael@0: michael@0: public static float getTranslationX(View view) { michael@0: AnimatorProxy proxy = AnimatorProxy.create(view); michael@0: return proxy.getTranslationX(); michael@0: } michael@0: michael@0: public static void setTranslationX(View view, float translationX) { michael@0: final AnimatorProxy proxy = AnimatorProxy.create(view); michael@0: proxy.setTranslationX(translationX); michael@0: } michael@0: michael@0: public static float getTranslationY(View view) { michael@0: final AnimatorProxy proxy = AnimatorProxy.create(view); michael@0: return proxy.getTranslationY(); michael@0: } michael@0: michael@0: public static void setTranslationY(View view, float translationY) { michael@0: final AnimatorProxy proxy = AnimatorProxy.create(view); michael@0: proxy.setTranslationY(translationY); michael@0: } michael@0: michael@0: public static float getAlpha(View view) { michael@0: final AnimatorProxy proxy = AnimatorProxy.create(view); michael@0: return proxy.getAlpha(); michael@0: } michael@0: michael@0: public static void setAlpha(View view, float alpha) { michael@0: final AnimatorProxy proxy = AnimatorProxy.create(view); michael@0: proxy.setAlpha(alpha); michael@0: } michael@0: michael@0: public static int getWidth(View view) { michael@0: final AnimatorProxy proxy = AnimatorProxy.create(view); michael@0: return proxy.getWidth(); michael@0: } michael@0: michael@0: public static void setWidth(View view, int width) { michael@0: final AnimatorProxy proxy = AnimatorProxy.create(view); michael@0: proxy.setWidth(width); michael@0: } michael@0: michael@0: public static int getHeight(View view) { michael@0: final AnimatorProxy proxy = AnimatorProxy.create(view); michael@0: return proxy.getHeight(); michael@0: } michael@0: michael@0: public static void setHeight(View view, int height) { michael@0: final AnimatorProxy proxy = AnimatorProxy.create(view); michael@0: proxy.setHeight(height); michael@0: } michael@0: }