本文整理汇总了Java中com.nineoldandroids.view.animation.AnimatorProxy.wrap方法的典型用法代码示例。如果您正苦于以下问题:Java AnimatorProxy.wrap方法的具体用法?Java AnimatorProxy.wrap怎么用?Java AnimatorProxy.wrap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.nineoldandroids.view.animation.AnimatorProxy
的用法示例。
在下文中一共展示了AnimatorProxy.wrap方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.nineoldandroids.view.animation.AnimatorProxy; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.pathanimator);
mButton = (Button) findViewById(R.id.button);
mButtonProxy = AnimatorProxy.wrap(mButton);
// Set up the path we're animating along
AnimatorPath path = new AnimatorPath();
path.moveTo(0, 0);
path.lineTo(0, 300);
path.curveTo(100, 0, 300, 900, 400, 500);
// Set up the animation
final ObjectAnimator anim = ObjectAnimator.ofObject(this, "buttonLoc",
new PathEvaluator(), path.getPoints().toArray());
anim.setDuration(1000);
mButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
anim.start();
}
});
}
示例2: i
import com.nineoldandroids.view.animation.AnimatorProxy; //导入方法依赖的package包/类
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);
}
示例3: startEnterAnimation
import com.nineoldandroids.view.animation.AnimatorProxy; //导入方法依赖的package包/类
public void startEnterAnimation() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
imgPreviewDummy.setPivotX(0);
imgPreviewDummy.setPivotY(0);
imgPreviewDummy.setScaleX(widthScale);
imgPreviewDummy.setScaleY(heightScale);
imgPreviewDummy.setTranslationX(leftDelta);
imgPreviewDummy.setTranslationY(topDelta);
} else {
AnimatorProxy proxy = AnimatorProxy.wrap(imgPreviewDummy);
proxy.setPivotX(0);
proxy.setPivotY(0);
proxy.setScaleX(widthScale);
proxy.setScaleY(heightScale);
proxy.setTranslationX(leftDelta);
proxy.setTranslationY(topDelta);
}
ViewPropertyAnimator.animate(imgPreviewDummy)
.setDuration(ANIMATION_DURATION)
.scaleX(1).scaleY(1)
.translationX(0).translationY(0)
.setInterpolator(INTERPOLATOR)
.setListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
// AppBarLayout is set invisible, because AppbarLayout has default background color.
appBarLayout.setVisibility(View.VISIBLE);
imgPreview.setVisibility(View.VISIBLE);
revealPreview();
}
});
}
示例4: ViewPropertyAnimatorPreHC
import com.nineoldandroids.view.animation.AnimatorProxy; //导入方法依赖的package包/类
ViewPropertyAnimatorPreHC(View view) {
this.mView = new WeakReference(view);
this.mProxy = AnimatorProxy.wrap(view);
}
示例5: ViewPropertyAnimatorPreHC
import com.nineoldandroids.view.animation.AnimatorProxy; //导入方法依赖的package包/类
/**
* Constructor, called by View. This is private by design, as the user should only
* get a ViewPropertyAnimator by calling View.animate().
*
* @param view The View associated with this ViewPropertyAnimator
*/
ViewPropertyAnimatorPreHC(View view) {
mView = new WeakReference<View>(view);
mProxy = AnimatorProxy.wrap(view);
}