本文整理了Java中android.widget.TextView.setPivotY()
方法的一些代码示例,展示了TextView.setPivotY()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextView.setPivotY()
方法的具体详情如下:
包路径:android.widget.TextView
类名称:TextView
方法名:setPivotY
暂无
代码示例来源:origin: ZieIony/Carbon
@Override
public void setPivotY(float pivotY) {
super.setPivotY(pivotY);
invalidateParentIfNeeded();
fireOnTransformationChangedListener();
}
代码示例来源:origin: derry/delion
void prepareTitleAnim(TextView urlBar, TextView titleBar) {
mTitleBar = titleBar;
mUrlBar = urlBar;
mUrlBar.setPivotX(0f);
mUrlBar.setPivotY(0f);
mShouldRunTitleAnimation = true;
}
代码示例来源:origin: stackoverflow.com
private void addTextViewOnCanvas(Canvas canvas) {
LinearLayout layout = new LinearLayout(_context);
TextView textView = new TextView(_context);
textView.setVisibility(View.VISIBLE);
textView.setText("Hello Multiline text world .............");
textView.setWidth(canvas.getWidth() - 100);
textView.setBackgroundColor(Color.YELLOW);
textView.setPivotX(0);
textView.setPivotY(0);
textView.setRotation(90F);
layout.addView(textView);
layout.measure(canvas.getWidth(), canvas.getHeight());
layout.layout(0, 0, canvas.getWidth(), canvas.getHeight());
// To place the text view somewhere specific:
canvas.translate(_PosX, _PosY);
layout.draw(canvas);
}
代码示例来源:origin: DingMouRen/DingDingMap
@Override
public void setRotateAnchorPoints() {
image.setPivotX(buttonRadius - imageRect.left);
image.setPivotY(buttonRadius - imageRect.top);
text.setPivotX(trueRadius - textRect.left);
text.setPivotY(trueRadius - textRect.top);
}
代码示例来源:origin: DingMouRen/DingDingMap
@Override
public void setRotateAnchorPoints() {
image.setPivotX(buttonRadius - imageRect.left);
image.setPivotY(buttonRadius - imageRect.top);
text.setPivotX(buttonRadius - textRect.left);
text.setPivotY(buttonRadius - textRect.top);
}
代码示例来源:origin: ywwynm/EverythingDone
public void fallLabel() {
if (!raised) {
return;
}
mTextView.setPivotX(1);
mTextView.setPivotY(1);
mTextView.animate().scaleX(1.0f).setDuration(96);
mTextView.animate().scaleY(1.0f).setDuration(96);
mTextView.animate().translationY(0).setDuration(96);
raised = false;
}
代码示例来源: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;
}
代码示例来源:origin: ywwynm/EverythingDone
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);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!