@Override public void setScaleY(float scaleY) { super.setScaleY(scaleY); invalidateParentIfNeeded(); fireOnTransformationChangedListener(); }
private void _showTapCount(int size) { _tapEventCountShow.setText(String.valueOf(size)); _tapEventCountShow.setVisibility(View.VISIBLE); _tapEventCountShow.setScaleX(1f); _tapEventCountShow.setScaleY(1f); ViewCompat.animate(_tapEventCountShow) .scaleXBy(-1f) .scaleYBy(-1f) .setDuration(800) .setStartDelay(100); } }
private void _showTapCount(int size) { _tapEventCountShow.setText(String.valueOf(size)); _tapEventCountShow.setVisibility(View.VISIBLE); _tapEventCountShow.setScaleX(1f); _tapEventCountShow.setScaleY(1f); ViewCompat.animate(_tapEventCountShow) .scaleXBy(-1f) .scaleYBy(-1f) .setDuration(800) .setStartDelay(100); } }
if (animate) { notification.setScaleX(0); notification.setScaleY(0); notification.animate() .scaleX(1)
private void _showTapCount(int size) { _tapEventCountShow.setText(String.valueOf(size)); _tapEventCountShow.setVisibility(View.VISIBLE); _tapEventCountShow.setScaleX(1f); _tapEventCountShow.setScaleY(1f); ViewCompat.animate(_tapEventCountShow) .scaleXBy(-1f) .scaleYBy(-1f) .setDuration(800) .setStartDelay(100); } }
private void _showTapCount(int size) { _tapEventCountShow.setText(String.valueOf(size)); _tapEventCountShow.setVisibility(View.VISIBLE); _tapEventCountShow.setScaleX(1f); _tapEventCountShow.setScaleY(1f); ViewCompat.animate(_tapEventCountShow) .scaleXBy(-1f) .scaleYBy(-1f) .setDuration(800) .setStartDelay(100); } }
private void _showTapCount(int size) { _tapEventCountShow.setText(String.valueOf(size)); _tapEventCountShow.setVisibility(View.VISIBLE); _tapEventCountShow.setScaleX(1f); _tapEventCountShow.setScaleY(1f); ViewCompat.animate(_tapEventCountShow) .scaleXBy(-1f) .scaleYBy(-1f) .setDuration(800) .setStartDelay(100); } }
public void run(RapidParserObject object, Object view, Var value) { ((TextView)view).setScaleY(value.getFloat()); } }
@Override public void onAnimationEnd(Animator animation) { categoryTab.setScaleX(1); categoryTab.setScaleY(1); }
@Override public void onAnimationCancel(Animator animation) { categoryTab.setScaleX(1); categoryTab.setScaleY(1); } }).start();
@Override public void doAnimationSetOpen(int state) { itemRoot.setBackgroundColor(mCurrentColor); helloTv.setScaleX(mFraction); helloTv.setScaleY(mFraction); helloTv.setAlpha(mFraction * 255); }
@Override public void onAnimationEnd(Animator animation) { binding.iReaderFolderCheckBox.setScaleX(1f); binding.iReaderFolderCheckBox.setScaleY(1f); binding.iReaderFolderCheckBox.animate().setListener(null); }
@Override public void doAnimationSet(int offset, float fraction) { mContentLl.scrollTo(-offset, 0); mFraction = 1 - fraction; itemRedTv.setScaleX(mFraction); itemRedTv.setScaleY(mFraction); itemBlueTv.setScaleX(mFraction); itemBlueTv.setScaleY(mFraction); helloTv.setScaleX(mFraction); helloTv.setScaleY(mFraction); helloTv.setAlpha(mFraction * 255); float blue = 233 * mFraction; mCurrentColor = Color.argb(233, 233 / 2, 233, (int) blue); itemRoot.setBackgroundColor(mCurrentColor); }
@Override public void onAnimationCancel(Animator animation) { binding.iReaderFolderCheckBox.setScaleX(1f); binding.iReaderFolderCheckBox.setScaleY(1f); binding.iReaderFolderCheckBox.animate().setListener(null); }
@Override public void doAnimationSet(int offset, float fraction) { mContentRl.scrollTo(offset, 0); itemTv.setScaleX(fraction); itemTv.setScaleY(fraction); itemTv.setAlpha(fraction * 255); titleLl.scrollTo(offset, 0); }
public void reset(boolean anim) { mRelativeLayout.setVisibility(View.VISIBLE); if (anim) { mRelativeLayout.animate().translationY(0); mTitle.animate().scaleX(1.0f); mTitle.animate().scaleY(1.0f); mSubtitle.animate().alpha(1.0f); mActionbarShadow.animate().alpha(0); } else { mRelativeLayout.setTranslationY(0); mTitle.setScaleX(1.0f); mTitle.setScaleY(1.0f); mSubtitle.setAlpha(1.0f); mActionbarShadow.setAlpha(0); } }
private void scaleExpandedInfoAreaView(TextView view) { view.setPivotX((float) (-view.getLeft())); view.setPivotY((float) (-(view.getTop() - this.mInfoAreaTop))); view.setScaleX(1.0f / this.mScaleFactor); view.setScaleY(1.0f / this.mScaleFactor); }
@Override public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) { mUrlBar.removeOnLayoutChangeListener(this); int[] newLoc = new int[2]; mUrlBar.getLocationInWindow(newLoc); mUrlBar.setScaleX(scale); mUrlBar.setScaleY(scale); mUrlBar.setTranslationX(oldLoc[0] - newLoc[0]); mUrlBar.setTranslationY(oldLoc[1] - newLoc[1]); mUrlBar.animate().scaleX(1f).scaleY(1f).translationX(0).translationY(0) .setDuration(CUSTOM_TAB_TOOLBAR_SLIDE_DURATION_MS) .setInterpolator(BakedBezierInterpolator.TRANSFORM_CURVE) .setListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { mTitleBar.animate().alpha(1f) .setInterpolator(BakedBezierInterpolator.FADE_IN_CURVE) .setDuration(CUSTOM_TAB_TOOLBAR_FADE_DURATION_MS).start(); } }).start(); } });
public void raiseLabel(boolean anim) { if (raised) { return; } mTextView.setPivotX(1); mTextView.setPivotY(1); if (anim) { mTextView.animate().scaleX(0.75f).setDuration(96); mTextView.animate().scaleY(0.75f).setDuration(96); mTextView.animate().translationY(-mScreenDensity * 24).setDuration(96); } else { mTextView.setScaleX(0.75f); mTextView.setScaleY(0.75f); mTextView.setTranslationY(-mScreenDensity * 24); } raised = true; }
private void updateHeader(int scrollY, boolean anim) { float scale = titleShrinkFactor * scrollY + 1; mTitle.setPivotX(1); mTitle.setPivotY(1); if (anim) { mRelativeLayout.animate().translationY(-headerTranslationYFactor * scrollY); /** * Changing scaleX and scaleY of title is better than changing its textSize. * pivotX and pivotY should be remained as 1 so that title's location won't * be changed incorrectly. */ mTitle.animate().scaleX(scale).setDuration(160); mTitle.animate().scaleY(scale).setDuration(160); mSubtitle.animate().alpha(-1.0f / mScreenDensity / 90 * scrollY + 1).withLayer().setDuration(160); } else { mRelativeLayout.setTranslationY((int) (-headerTranslationYFactor * scrollY)); mTitle.setScaleX(scale); mTitle.setScaleY(scale); mSubtitle.setAlpha(-1.0f / mScreenDensity / 90 * scrollY + 1); } } }