use of android.view.ViewPropertyAnimator.NameValuesHolder in project android_frameworks_base by DirtyUnicorns.
the class ViewPropertyAnimatorRT method cancelAnimators.
private void cancelAnimators(ArrayList<NameValuesHolder> mPendingAnimations) {
int size = mPendingAnimations.size();
for (int i = 0; i < size; i++) {
NameValuesHolder holder = mPendingAnimations.get(i);
int property = RenderNodeAnimator.mapViewPropertyToRenderProperty(holder.mNameConstant);
if (mAnimators[property] != null) {
mAnimators[property].cancel();
mAnimators[property] = null;
}
}
}
use of android.view.ViewPropertyAnimator.NameValuesHolder in project platform_frameworks_base by android.
the class ViewPropertyAnimatorRT method doStartAnimation.
private void doStartAnimation(ViewPropertyAnimator parent) {
int size = parent.mPendingAnimations.size();
long startDelay = parent.getStartDelay();
long duration = parent.getDuration();
TimeInterpolator interpolator = parent.getInterpolator();
if (interpolator == null) {
// Documented to be LinearInterpolator in ValueAnimator.setInterpolator
interpolator = sLinearInterpolator;
}
if (!RenderNodeAnimator.isNativeInterpolator(interpolator)) {
interpolator = new FallbackLUTInterpolator(interpolator, duration);
}
for (int i = 0; i < size; i++) {
NameValuesHolder holder = parent.mPendingAnimations.get(i);
int property = RenderNodeAnimator.mapViewPropertyToRenderProperty(holder.mNameConstant);
final float finalValue = holder.mFromValue + holder.mDeltaValue;
RenderNodeAnimator animator = new RenderNodeAnimator(property, finalValue);
animator.setStartDelay(startDelay);
animator.setDuration(duration);
animator.setInterpolator(interpolator);
animator.setTarget(mView);
animator.start();
mAnimators[property] = animator;
}
parent.mPendingAnimations.clear();
}
use of android.view.ViewPropertyAnimator.NameValuesHolder in project platform_frameworks_base by android.
the class ViewPropertyAnimatorRT method cancelAnimators.
private void cancelAnimators(ArrayList<NameValuesHolder> mPendingAnimations) {
int size = mPendingAnimations.size();
for (int i = 0; i < size; i++) {
NameValuesHolder holder = mPendingAnimations.get(i);
int property = RenderNodeAnimator.mapViewPropertyToRenderProperty(holder.mNameConstant);
if (mAnimators[property] != null) {
mAnimators[property].cancel();
mAnimators[property] = null;
}
}
}
use of android.view.ViewPropertyAnimator.NameValuesHolder in project android_frameworks_base by ResurrectionRemix.
the class ViewPropertyAnimatorRT method cancelAnimators.
private void cancelAnimators(ArrayList<NameValuesHolder> mPendingAnimations) {
int size = mPendingAnimations.size();
for (int i = 0; i < size; i++) {
NameValuesHolder holder = mPendingAnimations.get(i);
int property = RenderNodeAnimator.mapViewPropertyToRenderProperty(holder.mNameConstant);
if (mAnimators[property] != null) {
mAnimators[property].cancel();
mAnimators[property] = null;
}
}
}
use of android.view.ViewPropertyAnimator.NameValuesHolder in project android_frameworks_base by crdroidandroid.
the class ViewPropertyAnimatorRT method doStartAnimation.
private void doStartAnimation(ViewPropertyAnimator parent) {
int size = parent.mPendingAnimations.size();
long startDelay = parent.getStartDelay();
long duration = parent.getDuration();
TimeInterpolator interpolator = parent.getInterpolator();
if (interpolator == null) {
// Documented to be LinearInterpolator in ValueAnimator.setInterpolator
interpolator = sLinearInterpolator;
}
if (!RenderNodeAnimator.isNativeInterpolator(interpolator)) {
interpolator = new FallbackLUTInterpolator(interpolator, duration);
}
for (int i = 0; i < size; i++) {
NameValuesHolder holder = parent.mPendingAnimations.get(i);
int property = RenderNodeAnimator.mapViewPropertyToRenderProperty(holder.mNameConstant);
final float finalValue = holder.mFromValue + holder.mDeltaValue;
RenderNodeAnimator animator = new RenderNodeAnimator(property, finalValue);
animator.setStartDelay(startDelay);
animator.setDuration(duration);
animator.setInterpolator(interpolator);
animator.setTarget(mView);
animator.start();
mAnimators[property] = animator;
}
parent.mPendingAnimations.clear();
}
Aggregations