com.nineoldandroids.view.animation.AnimatorProxy Java Examples
The following examples show how to use
com.nineoldandroids.view.animation.AnimatorProxy.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ObjectAnimator.java From Mover with Apache License 2.0 | 6 votes |
/** * This function is called immediately before processing the first animation * frame of an animation. If there is a nonzero <code>startDelay</code>, the * function is called after that delay ends. * It takes care of the final initialization steps for the * animation. This includes setting mEvaluator, if the user has not yet * set it up, and the setter/getter methods, if the user did not supply * them. * * <p>Overriders of this method should call the superclass method to cause * internal mechanisms to be set up correctly.</p> */ @Override void initAnimation() { if (!mInitialized) { // mValueType may change due to setter/getter setup; do this before calling super.init(), // which uses mValueType to set up the default type evaluator. if ((mProperty == null) && AnimatorProxy.NEEDS_PROXY && (mTarget instanceof View) && PROXY_PROPERTIES.containsKey(mPropertyName)) { setProperty(PROXY_PROPERTIES.get(mPropertyName)); } int numValues = mValues.length; for (int i = 0; i < numValues; ++i) { mValues[i].setupSetterAndGetter(mTarget); } super.initAnimation(); } }
Example #2
Source File: SlidingUpPanelLayout.java From mobile-manager-tool with MIT License | 6 votes |
@SuppressLint("NewApi") private void onPanelDragged(int newTop) { mSlideState = SlideState.DRAGGING; // Recompute the slide offset based on the new top position mSlideOffset = computeSlideOffset(newTop); // Update the parallax based on the new slide offset if (mParallaxOffset > 0 && mSlideOffset >= 0) { int mainViewOffset = getCurrentParalaxOffset(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { mMainView.setTranslationY(mainViewOffset); } else { AnimatorProxy.wrap(mMainView).setTranslationY(mainViewOffset); } } // Dispatch the slide event dispatchOnPanelSlide(mSlideableView); // If the slide offset is negative, and overlay is not on, we need to increase the // height of the main content if (mSlideOffset <= 0 && !mOverlayContent) { // expand the main view LayoutParams lp = (LayoutParams)mMainView.getLayoutParams(); lp.height = mIsSlidingUp ? (newTop - getPaddingBottom()) : (getHeight() - getPaddingBottom() - mSlideableView.getMeasuredHeight() - newTop); mMainView.requestLayout(); } }
Example #3
Source File: SlidingUpPanelLayout.java From ting with Apache License 2.0 | 5 votes |
@SuppressLint("NewApi") private void onPanelDragged(int newTop) { mSlideState = PanelState.DRAGGING; // Recompute the slide offset based on the new top position mSlideOffset = computeSlideOffset(newTop); // Update the parallax based on the new slide offset if (mParallaxOffset > 0 && mSlideOffset >= 0) { int mainViewOffset = getCurrentParalaxOffset(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { mMainView.setTranslationY(mainViewOffset); } else { AnimatorProxy.wrap(mMainView).setTranslationY(mainViewOffset); } } // Dispatch the slide event dispatchOnPanelSlide(mSlideableView); // If the slide offset is negative, and overlay is not on, we need to increase the // height of the main content LayoutParams lp = (LayoutParams)mMainView.getLayoutParams(); int defaultHeight = getHeight() - getPaddingBottom() - getPaddingTop() - mPanelHeight; if (mSlideOffset <= 0 && !mOverlayContent) { // expand the main view lp.height = mIsSlidingUp ? (newTop - getPaddingBottom()) : (getHeight() - getPaddingBottom() - mSlideableView.getMeasuredHeight() - newTop); mMainView.requestLayout(); } else if (lp.height != defaultHeight && !mOverlayContent) { lp.height = defaultHeight; mMainView.requestLayout(); } }
Example #4
Source File: FloatLabeledEditText.java From imsdk-android with MIT License | 5 votes |
private void onFocusChanged(boolean gotFocus) { if (gotFocus && mHintTextView.getVisibility() == VISIBLE) { ObjectAnimator.ofFloat(mHintTextView, "alpha", 0.33f, 1f).start(); } else if (mHintTextView.getVisibility() == VISIBLE) { AnimatorProxy.wrap(mHintTextView).setAlpha(1f); //Need this for compat reasons ObjectAnimator.ofFloat(mHintTextView, "alpha", 1f, 0.33f).start(); } }
Example #5
Source File: SlidingUpPanelLayout.java From react-native-photo-editor with Apache License 2.0 | 5 votes |
/** * Update the parallax based on the current slide offset. */ @SuppressLint("NewApi") private void applyParallaxForCurrentSlideOffset() { if (mParallaxOffset > 0) { int mainViewOffset = getCurrentParallaxOffset(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { mMainView.setTranslationY(mainViewOffset); } else { AnimatorProxy.wrap(mMainView).setTranslationY(mainViewOffset); } } }
Example #6
Source File: i.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
i(View view) { e = false; f = 0L; g = false; i = false; j = null; k = new k(this, null); a = new ArrayList(); x = new j(this); y = new HashMap(); c = new WeakReference(view); b = AnimatorProxy.wrap(view); }
Example #7
Source File: ViewHelper.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public static float getAlpha(View view) { if (AnimatorProxy.NEEDS_PROXY) { return AnimatorProxy.wrap(view).getAlpha(); } else { return a.a(view); } }
Example #8
Source File: ViewHelper.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public static float getPivotX(View view) { if (AnimatorProxy.NEEDS_PROXY) { return AnimatorProxy.wrap(view).getPivotX(); } else { return a.b(view); } }
Example #9
Source File: ViewHelper.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public static float getPivotY(View view) { if (AnimatorProxy.NEEDS_PROXY) { return AnimatorProxy.wrap(view).getPivotY(); } else { return a.c(view); } }
Example #10
Source File: ViewHelper.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public static float getRotation(View view) { if (AnimatorProxy.NEEDS_PROXY) { return AnimatorProxy.wrap(view).getRotation(); } else { return a.d(view); } }
Example #11
Source File: ViewHelper.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public static float getRotationX(View view) { if (AnimatorProxy.NEEDS_PROXY) { return AnimatorProxy.wrap(view).getRotationX(); } else { return a.e(view); } }
Example #12
Source File: ViewHelper.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public static float getRotationY(View view) { if (AnimatorProxy.NEEDS_PROXY) { return AnimatorProxy.wrap(view).getRotationY(); } else { return a.f(view); } }
Example #13
Source File: ViewHelper.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public static float getScaleX(View view) { if (AnimatorProxy.NEEDS_PROXY) { return AnimatorProxy.wrap(view).getScaleX(); } else { return a.g(view); } }
Example #14
Source File: ViewHelper.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public static float getScrollX(View view) { if (AnimatorProxy.NEEDS_PROXY) { return (float)AnimatorProxy.wrap(view).getScrollX(); } else { return a.i(view); } }
Example #15
Source File: ViewHelper.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public static float getTranslationX(View view) { if (AnimatorProxy.NEEDS_PROXY) { return AnimatorProxy.wrap(view).getTranslationX(); } else { return a.k(view); } }
Example #16
Source File: ViewHelper.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public static float getTranslationY(View view) { if (AnimatorProxy.NEEDS_PROXY) { return AnimatorProxy.wrap(view).getTranslationY(); } else { return a.l(view); } }
Example #17
Source File: ViewHelper.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public static float getX(View view) { if (AnimatorProxy.NEEDS_PROXY) { return AnimatorProxy.wrap(view).getX(); } else { return a.m(view); } }
Example #18
Source File: ViewHelper.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public static float getY(View view) { if (AnimatorProxy.NEEDS_PROXY) { return AnimatorProxy.wrap(view).getY(); } else { return a.n(view); } }
Example #19
Source File: ViewHelper.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public static void setAlpha(View view, float f) { if (AnimatorProxy.NEEDS_PROXY) { AnimatorProxy.wrap(view).setAlpha(f); return; } else { a.a(view, f); return; } }
Example #20
Source File: ViewHelper.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public static void setPivotX(View view, float f) { if (AnimatorProxy.NEEDS_PROXY) { AnimatorProxy.wrap(view).setPivotX(f); return; } else { a.b(view, f); return; } }
Example #21
Source File: ViewHelper.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public static void setPivotY(View view, float f) { if (AnimatorProxy.NEEDS_PROXY) { AnimatorProxy.wrap(view).setPivotY(f); return; } else { a.c(view, f); return; } }
Example #22
Source File: ViewHelper.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public static void setRotationX(View view, float f) { if (AnimatorProxy.NEEDS_PROXY) { AnimatorProxy.wrap(view).setRotationX(f); return; } else { a.e(view, f); return; } }
Example #23
Source File: ViewHelper.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public static void setScaleX(View view, float f) { if (AnimatorProxy.NEEDS_PROXY) { AnimatorProxy.wrap(view).setScaleX(f); return; } else { a.g(view, f); return; } }
Example #24
Source File: ViewHelper.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public static void setScaleY(View view, float f) { if (AnimatorProxy.NEEDS_PROXY) { AnimatorProxy.wrap(view).setScaleY(f); return; } else { a.h(view, f); return; } }
Example #25
Source File: ViewHelper.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public static void setScrollY(View view, int i) { if (AnimatorProxy.NEEDS_PROXY) { AnimatorProxy.wrap(view).setScrollY(i); return; } else { a.b(view, i); return; } }
Example #26
Source File: ViewHelper.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public static void setTranslationX(View view, float f) { if (AnimatorProxy.NEEDS_PROXY) { AnimatorProxy.wrap(view).setTranslationX(f); return; } else { a.i(view, f); return; } }
Example #27
Source File: ViewHelper.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public static void setTranslationY(View view, float f) { if (AnimatorProxy.NEEDS_PROXY) { AnimatorProxy.wrap(view).setTranslationY(f); return; } else { a.j(view, f); return; } }
Example #28
Source File: ViewHelper.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public static void setX(View view, float f) { if (AnimatorProxy.NEEDS_PROXY) { AnimatorProxy.wrap(view).setX(f); return; } else { a.k(view, f); return; } }
Example #29
Source File: ViewHelper.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public static void setY(View view, float f) { if (AnimatorProxy.NEEDS_PROXY) { AnimatorProxy.wrap(view).setY(f); return; } else { a.l(view, f); return; } }
Example #30
Source File: SlidingUpPanelLayout.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
private void onPanelDragged(int i) { int k; label0: { int j = getSlidingTop(); float f; if (mIsSlidingUp) { f = (float)(i - j) / (float)mSlideRange; } else { f = (float)(j - i) / (float)mSlideRange; } mSlideOffset = f; dispatchOnPanelSlide(mSlideableView); if (mParalaxOffset > 0) { k = getCurrentParalaxOffset(); if (android.os.Build.VERSION.SDK_INT < 11) { break label0; } mMainView.setTranslationY(k); } return; } AnimatorProxy.wrap(mMainView).setTranslationY(k); }