mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-12 14:37:50 +00:00
8f492a6463
--HG-- rename : mobile/android/base/AnimatorProxy.java => mobile/android/base/animation/AnimatorProxy.java rename : mobile/android/base/HeightChangeAnimation.java => mobile/android/base/animation/HeightChangeAnimation.java rename : mobile/android/base/PropertyAnimator.java => mobile/android/base/animation/PropertyAnimator.java rename : mobile/android/base/Rotate3DAnimation.java => mobile/android/base/animation/Rotate3DAnimation.java rename : mobile/android/base/ViewHelper.java => mobile/android/base/animation/ViewHelper.java
63 lines
1.7 KiB
Java
63 lines
1.7 KiB
Java
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
package org.mozilla.gecko.animation;
|
|
|
|
import android.view.View;
|
|
|
|
public final class ViewHelper {
|
|
private ViewHelper() {
|
|
}
|
|
|
|
public static float getTranslationX(View view) {
|
|
AnimatorProxy proxy = AnimatorProxy.create(view);
|
|
return proxy.getTranslationX();
|
|
}
|
|
|
|
public static void setTranslationX(View view, float translationX) {
|
|
final AnimatorProxy proxy = AnimatorProxy.create(view);
|
|
proxy.setTranslationX(translationX);
|
|
}
|
|
|
|
public static float getTranslationY(View view) {
|
|
final AnimatorProxy proxy = AnimatorProxy.create(view);
|
|
return proxy.getTranslationY();
|
|
}
|
|
|
|
public static void setTranslationY(View view, float translationY) {
|
|
final AnimatorProxy proxy = AnimatorProxy.create(view);
|
|
proxy.setTranslationY(translationY);
|
|
}
|
|
|
|
public static float getAlpha(View view) {
|
|
final AnimatorProxy proxy = AnimatorProxy.create(view);
|
|
return proxy.getAlpha();
|
|
}
|
|
|
|
public static void setAlpha(View view, float alpha) {
|
|
final AnimatorProxy proxy = AnimatorProxy.create(view);
|
|
proxy.setAlpha(alpha);
|
|
}
|
|
|
|
public static int getWidth(View view) {
|
|
final AnimatorProxy proxy = AnimatorProxy.create(view);
|
|
return proxy.getWidth();
|
|
}
|
|
|
|
public static void setWidth(View view, int width) {
|
|
final AnimatorProxy proxy = AnimatorProxy.create(view);
|
|
proxy.setWidth(width);
|
|
}
|
|
|
|
public static int getHeight(View view) {
|
|
final AnimatorProxy proxy = AnimatorProxy.create(view);
|
|
return proxy.getHeight();
|
|
}
|
|
|
|
public static void setHeight(View view, int height) {
|
|
final AnimatorProxy proxy = AnimatorProxy.create(view);
|
|
proxy.setHeight(height);
|
|
}
|
|
}
|