Open stanbar opened 9 years ago
It would be very helpful for me as well if this is possible.
It's actually quite simple to accomplish this by using your own BaseViewAnimator
I will take SlideInDownAnimator
from the library as an example:
public class SlideInDownAnimator extends BaseViewAnimator {
@Override
public void prepare(View target) {
int distance = target.getTop() + target.getHeight();
getAnimatorAgent().playTogether(
ObjectAnimator.ofFloat(target,"alpha",0,1),
ObjectAnimator.ofFloat(target,"translationY",-distance,0)
);
}
}
If you want no fade in the animation, just copy the class to your project and remove 1 line:
public class SlideInDownAnimatorNoFade extends BaseViewAnimator {
@Override
public void prepare(View target) {
int distance = target.getTop() + target.getHeight();
getAnimatorAgent().playTogether(
// ObjectAnimator.ofFloat(target,"alpha",0,1),
ObjectAnimator.ofFloat(target,"translationY",-distance,0)
);
}
}
Then use it to perform your animation
YoYo.with(new SlideInDownAnimatorNoFade())
.duration(700)
.playOn(findViewById(R.id.edit_area));
Hi. Is it possible to make slide animation from position 0 to target position without fading ?