android.widget.TextView.setScaleX()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(245)

本文整理了Java中android.widget.TextView.setScaleX()方法的一些代码示例,展示了TextView.setScaleX()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextView.setScaleX()方法的具体详情如下:
包路径:android.widget.TextView
类名称:TextView
方法名:setScaleX

TextView.setScaleX介绍

暂无

代码示例

代码示例来源:origin: ZieIony/Carbon

@Override
public void setScaleX(float scaleX) {
  super.setScaleX(scaleX);
  invalidateParentIfNeeded();
  fireOnTransformationChangedListener();
}

代码示例来源:origin: kaushikgopal/RxJava-Android-Samples

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);
 }
}

代码示例来源:origin: kaushikgopal/RxJava-Android-Samples

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);
 }
}

代码示例来源:origin: nickbutcher/plaid

private void animateToolbar() {
  // this is gross but toolbar doesn't expose it's children to animate them :(
  View t = toolbar.getChildAt(0);
  if (t != null && t instanceof TextView) {
    TextView title = (TextView) t;
    // fade in and space out the title.  Animating the letterSpacing performs horribly so
    // fake it by setting the desired letterSpacing then animating the scaleX ¯\_(ツ)_/¯
    title.setAlpha(0f);
    title.setScaleX(0.8f);
    title.animate()
        .alpha(1f)
        .scaleX(1f)
        .setStartDelay(300)
        .setDuration(900)
        .setInterpolator(AnimUtils.getFastOutSlowInInterpolator(this));
  }
}

代码示例来源:origin: aurelhubert/ahbottomnavigation

notification.setText(String.valueOf(notificationItem.getText()));
if (animate) {
  notification.setScaleX(0);
  notification.setScaleY(0);
  notification.animate()

代码示例来源:origin: xinghongfei/LookLook

private void animateToolbar() {
  // this is gross but toolbar doesn't expose it's children to animate them :(
  View t = toolbar.getChildAt(0);
  if (t != null && t instanceof TextView) {
    TextView title = (TextView) t;
    // fade in and space out the title.  Animating the letterSpacing performs horribly so
    // fake it by setting the desired letterSpacing then animating the scaleX ¯\_(ツ)_/¯
    title.setAlpha(0f);
    title.setScaleX(0.8f);
    title.animate()
        .alpha(1f)
        .scaleX(1f)
        .setStartDelay(500)
        .setDuration(900)
        .setInterpolator(AnimUtils.getFastOutSlowInInterpolator(this)).start();
  }
  View amv = toolbar.getChildAt(1);
  if (amv != null & amv instanceof ActionMenuView) {
    ActionMenuView actions = (ActionMenuView) amv;
    popAnim(actions.getChildAt(0), 500, 200); // filter
    popAnim(actions.getChildAt(1), 700, 200); // overflow
  }
}

代码示例来源:origin: cn-ljb/rxjava_for_android

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);
  }
}

代码示例来源:origin: THEONE10211024/RxJavaSamples

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);
  }
}

代码示例来源:origin: THEONE10211024/RxJavaSamples

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);
  }
}

代码示例来源:origin: githubwing/WingUE

@Override public void onAnimationUpdate(ValueAnimator valueAnimator) {
  mSearchBGTxt.setScaleX((Float) valueAnimator.getAnimatedValue());
 }
});

代码示例来源:origin: quaap/LaunchTime

@Override
public void onAnimationEnd(Animator animation) {
  categoryTab.setScaleX(1);
  categoryTab.setScaleY(1);
}

代码示例来源:origin: Tencent/RapidView

public void run(RapidParserObject object, Object view, Var value) {
    ((TextView)view).setScaleX(value.getFloat());
  }
}

代码示例来源:origin: quaap/LaunchTime

@Override
  public void onAnimationCancel(Animator animation) {
    categoryTab.setScaleX(1);
    categoryTab.setScaleY(1);
  }
}).start();

代码示例来源:origin: ruzhan123/ViewHolder-Slide-Helper

@Override
public void doAnimationSetOpen(int state) {
  itemRoot.setBackgroundColor(mCurrentColor);
  helloTv.setScaleX(mFraction);
  helloTv.setScaleY(mFraction);
  helloTv.setAlpha(mFraction * 255);
}

代码示例来源:origin: ruzhan123/ViewHolder-Slide-Helper

@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);
}

代码示例来源:origin: AlphaBoom/ClassifyView

@Override
public void onAnimationEnd(Animator animation) {
  binding.iReaderFolderCheckBox.setScaleX(1f);
  binding.iReaderFolderCheckBox.setScaleY(1f);
  binding.iReaderFolderCheckBox.animate().setListener(null);
}

代码示例来源:origin: AlphaBoom/ClassifyView

@Override
public void onAnimationCancel(Animator animation) {
  binding.iReaderFolderCheckBox.setScaleX(1f);
  binding.iReaderFolderCheckBox.setScaleY(1f);
  binding.iReaderFolderCheckBox.animate().setListener(null);
}

代码示例来源:origin: ruzhan123/ViewHolder-Slide-Helper

@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);
}

代码示例来源:origin: rockon999/LeanbackLauncher

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);
}

代码示例来源:origin: ywwynm/EverythingDone

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;
}

相关文章

TextView类方法