use of com.nineoldandroids.animation.AnimatorSet in project PhotoNoter by yydcdut.
the class EditTextActivity method startActivityAnimation.
@Override
public void startActivityAnimation() {
int actionBarHeight = getActionBarSize();
int screenHeight = Utils.sScreenHeight;
int contentEditHeight = screenHeight - actionBarHeight * 2;
AnimatorSet animation = new AnimatorSet();
animation.setDuration(Const.DURATION_ACTIVITY);
animation.playTogether(ObjectAnimator.ofFloat(mAppBarLayout, "translationY", -actionBarHeight, 0), ObjectAnimator.ofFloat(mTitleTextInputLayout, "translationY", -actionBarHeight * 3, 0), ObjectAnimator.ofFloat(mContentEdit, "translationY", contentEditHeight, 0), ObjectAnimator.ofFloat(mFabMenuLayout, "translationY", contentEditHeight, 0), ObjectAnimator.ofFloat(mHorizontalEditScrollView, "translationY", contentEditHeight, 0));
animation.start();
}
use of com.nineoldandroids.animation.AnimatorSet in project PhotoNoter by yydcdut.
the class DetailActivity method initAnimationView.
@Override
public void initAnimationView() {
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.playTogether(ObjectAnimator.ofFloat(mCardView, "translationY", 0, mTranslateHeight));
animatorSet.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
mOverlayView.setVisibility(View.GONE);
mIsIgnoreClick = true;
}
@Override
public void onAnimationStart(Animator animation) {
super.onAnimationStart(animation);
mIsIgnoreClick = true;
}
});
animatorSet.setDuration(400);
animatorSet.setInterpolator(new DecelerateInterpolator());
animatorSet.start();
mAnimationHandler.postDelayed(mDownDelayRunnable, 350);
}
}, 500);
}
use of com.nineoldandroids.animation.AnimatorSet in project PhotoNoter by yydcdut.
the class PhotoDetailActivity method showWidget.
@Override
public void showWidget(final IPhotoDetailPresenter.OnAnimationAdapter onAnimationAdapter) {
AnimatorSet animation = new AnimatorSet();
animation.setDuration(1000);
animation.playTogether(ObjectAnimator.ofFloat(mAppBarLayout, "Y", -getActionBarSize() - (AppCompat.AFTER_LOLLIPOP ? getStatusBarSize() : 0), AppCompat.AFTER_LOLLIPOP ? getStatusBarSize() : 0), ObjectAnimator.ofFloat(mBottomLayout, "Y", mBottomLayout.getTop() + getActionBarSize(), mBottomLayout.getTop()), ObjectAnimator.ofFloat(mStatusCoverView, "Y", -getActionBarSize(), 0f));
animation.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(Animator animation) {
if (onAnimationAdapter != null) {
onAnimationAdapter.onAnimationStarted(IPhotoDetailPresenter.STATE_SHOW);
}
}
@Override
public void onAnimationEnd(Animator animation) {
if (onAnimationAdapter != null) {
onAnimationAdapter.onAnimationEnded(IPhotoDetailPresenter.STATE_SHOW);
}
}
});
animation.start();
}
use of com.nineoldandroids.animation.AnimatorSet in project ride-read-android by Ride-Read.
the class ShowPictureActivity method MoveView.
private void MoveView() {
ObjectAnimator.ofFloat(mainView, "alpha", 0.8f).setDuration(0).start();
mainView.setVisibility(View.VISIBLE);
AnimatorSet set = new AnimatorSet();
set.playTogether(ObjectAnimator.ofFloat(showImageView, "translationX", tx).setDuration(200), ObjectAnimator.ofFloat(showImageView, "translationY", ty).setDuration(200), ObjectAnimator.ofFloat(mainView, "alpha", 1).setDuration(200));
set.addListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animator) {
}
@Override
public void onAnimationEnd(Animator animator) {
showImageView.setScaleType(ImageView.ScaleType.FIT_XY);
spring.setEndValue(1);
}
@Override
public void onAnimationCancel(Animator animator) {
}
@Override
public void onAnimationRepeat(Animator animator) {
}
});
set.start();
}
use of com.nineoldandroids.animation.AnimatorSet in project ride-read-android by Ride-Read.
the class ShowPictureActivity method MoveBackView.
private void MoveBackView() {
AnimatorSet set = new AnimatorSet();
set.playTogether(ObjectAnimator.ofFloat(showImageView, "translationX", to_x).setDuration(200), ObjectAnimator.ofFloat(showImageView, "translationY", to_y).setDuration(200));
set.addListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animator) {
}
@Override
public void onAnimationEnd(Animator animator) {
finish();
}
@Override
public void onAnimationCancel(Animator animator) {
}
@Override
public void onAnimationRepeat(Animator animator) {
}
});
set.start();
}
Aggregations