mobile/android/base/animation/ViewHelper.java

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     3  * You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 package org.mozilla.gecko.animation;
     7 import android.view.View;
     9 public final class ViewHelper {
    10 	private ViewHelper() {
    11 	}
    13 	public static float getTranslationX(View view) {
    14 		AnimatorProxy proxy = AnimatorProxy.create(view);
    15 		return proxy.getTranslationX();
    16 	}
    18 	public static void setTranslationX(View view, float translationX) {
    19 		final AnimatorProxy proxy = AnimatorProxy.create(view);
    20 		proxy.setTranslationX(translationX);
    21 	}
    23 	public static float getTranslationY(View view) {
    24 		final AnimatorProxy proxy = AnimatorProxy.create(view);
    25 		return proxy.getTranslationY();
    26 	}
    28 	public static void setTranslationY(View view, float translationY) {
    29 		final AnimatorProxy proxy = AnimatorProxy.create(view);
    30 		proxy.setTranslationY(translationY);
    31 	}
    33 	public static float getAlpha(View view) {
    34 		final AnimatorProxy proxy = AnimatorProxy.create(view);
    35 		return proxy.getAlpha();
    36 	}
    38 	public static void setAlpha(View view, float alpha) {
    39 		final AnimatorProxy proxy = AnimatorProxy.create(view);
    40 		proxy.setAlpha(alpha);
    41 	}
    43 	public static int getWidth(View view) {
    44 		final AnimatorProxy proxy = AnimatorProxy.create(view);
    45 		return proxy.getWidth();
    46 	}
    48 	public static void setWidth(View view, int width) {
    49 		final AnimatorProxy proxy = AnimatorProxy.create(view);
    50 		proxy.setWidth(width);
    51 	}
    53 	public static int getHeight(View view) {
    54 		final AnimatorProxy proxy = AnimatorProxy.create(view);
    55 		return proxy.getHeight();
    56 	}
    58 	public static void setHeight(View view, int height) {
    59 		final AnimatorProxy proxy = AnimatorProxy.create(view);
    60 		proxy.setHeight(height);
    61 	}
    62 }

mercurial