本文整理汇总了Java中com.nineoldandroids.view.animation.AnimatorProxy类的典型用法代码示例。如果您正苦于以下问题:Java AnimatorProxy类的具体用法?Java AnimatorProxy怎么用?Java AnimatorProxy使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AnimatorProxy类属于com.nineoldandroids.view.animation包,在下文中一共展示了AnimatorProxy类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initAnimation
import com.nineoldandroids.view.animation.AnimatorProxy; //导入依赖的package包/类
/**
* 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();
}
}
示例2: onPanelDragged
import com.nineoldandroids.view.animation.AnimatorProxy; //导入依赖的package包/类
@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();
}
}
示例3: applyParallaxForCurrentSlideOffset
import com.nineoldandroids.view.animation.AnimatorProxy; //导入依赖的package包/类
/**
* Update the parallax based on the current slide offset.
*/
@SuppressLint("NewApi")
private void applyParallaxForCurrentSlideOffset() {
if (mParallaxOffset > 0) {
int mainViewOffset = getCurrentParalaxOffset();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
mMainView.setTranslationY(mainViewOffset);
} else {
AnimatorProxy.wrap(mMainView).setTranslationY(mainViewOffset);
}
}
}
示例4: applyParallaxForCurrentSlideOffset
import com.nineoldandroids.view.animation.AnimatorProxy; //导入依赖的package包/类
/**
* 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);
}
}
}
示例5: applyParallaxForCurrentSlideOffset
import com.nineoldandroids.view.animation.AnimatorProxy; //导入依赖的package包/类
/**
* Update the parallax based on the current slide offset.
*/
@SuppressLint("NewApi")
private void applyParallaxForCurrentSlideOffset() {
if (mParallaxOffset > 0) {
int mainViewOffset = getCurrentParalaxOffset();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
mMainView.setTranslationY(mainViewOffset);
} else {
AnimatorProxy.wrap(mMainView).setTranslationY(mainViewOffset);
}
}
}
示例6: initAnimation
import com.nineoldandroids.view.animation.AnimatorProxy; //导入依赖的package包/类
void initAnimation() {
if (!this.mInitialized) {
if (this.mProperty == null && AnimatorProxy.NEEDS_PROXY && (this.mTarget instanceof
View) && PROXY_PROPERTIES.containsKey(this.mPropertyName)) {
setProperty((Property) PROXY_PROPERTIES.get(this.mPropertyName));
}
for (PropertyValuesHolder propertyValuesHolder : this.mValues) {
propertyValuesHolder.setupSetterAndGetter(this.mTarget);
}
super.initAnimation();
}
}
示例7: setAlpha
import com.nineoldandroids.view.animation.AnimatorProxy; //导入依赖的package包/类
public static void setAlpha(View view, float alpha) {
if (AnimatorProxy.NEEDS_PROXY) {
AnimatorProxy.wrap(view).setAlpha(alpha);
} else {
Honeycomb.setAlpha(view, alpha);
}
}
示例8: setPivotX
import com.nineoldandroids.view.animation.AnimatorProxy; //导入依赖的package包/类
public static void setPivotX(View view, float pivotX) {
if (AnimatorProxy.NEEDS_PROXY) {
AnimatorProxy.wrap(view).setPivotX(pivotX);
} else {
Honeycomb.setPivotX(view, pivotX);
}
}
示例9: setPivotY
import com.nineoldandroids.view.animation.AnimatorProxy; //导入依赖的package包/类
public static void setPivotY(View view, float pivotY) {
if (AnimatorProxy.NEEDS_PROXY) {
AnimatorProxy.wrap(view).setPivotY(pivotY);
} else {
Honeycomb.setPivotY(view, pivotY);
}
}
示例10: setRotation
import com.nineoldandroids.view.animation.AnimatorProxy; //导入依赖的package包/类
public static void setRotation(View view, float rotation) {
if (AnimatorProxy.NEEDS_PROXY) {
AnimatorProxy.wrap(view).setRotation(rotation);
} else {
Honeycomb.setRotation(view, rotation);
}
}
示例11: setRotationX
import com.nineoldandroids.view.animation.AnimatorProxy; //导入依赖的package包/类
public static void setRotationX(View view, float rotationX) {
if (AnimatorProxy.NEEDS_PROXY) {
AnimatorProxy.wrap(view).setRotationX(rotationX);
} else {
Honeycomb.setRotationX(view, rotationX);
}
}
示例12: setRotationY
import com.nineoldandroids.view.animation.AnimatorProxy; //导入依赖的package包/类
public static void setRotationY(View view, float rotationY) {
if (AnimatorProxy.NEEDS_PROXY) {
AnimatorProxy.wrap(view).setRotationY(rotationY);
} else {
Honeycomb.setRotationY(view, rotationY);
}
}
示例13: setScaleX
import com.nineoldandroids.view.animation.AnimatorProxy; //导入依赖的package包/类
public static void setScaleX(View view, float scaleX) {
if (AnimatorProxy.NEEDS_PROXY) {
AnimatorProxy.wrap(view).setScaleX(scaleX);
} else {
Honeycomb.setScaleX(view, scaleX);
}
}
示例14: setScaleY
import com.nineoldandroids.view.animation.AnimatorProxy; //导入依赖的package包/类
public static void setScaleY(View view, float scaleY) {
if (AnimatorProxy.NEEDS_PROXY) {
AnimatorProxy.wrap(view).setScaleY(scaleY);
} else {
Honeycomb.setScaleY(view, scaleY);
}
}
示例15: setScrollX
import com.nineoldandroids.view.animation.AnimatorProxy; //导入依赖的package包/类
public static void setScrollX(View view, int scrollX) {
if (AnimatorProxy.NEEDS_PROXY) {
AnimatorProxy.wrap(view).setScrollX(scrollX);
} else {
Honeycomb.setScrollX(view, scrollX);
}
}