本文整理了Java中android.widget.TextView.setRotation()
方法的一些代码示例,展示了TextView.setRotation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextView.setRotation()
方法的具体详情如下:
包路径:android.widget.TextView
类名称:TextView
方法名:setRotation
暂无
代码示例来源:origin: ZieIony/Carbon
@Override
public void setRotation(float rotation) {
super.setRotation(rotation);
invalidateParentIfNeeded();
fireOnTransformationChangedListener();
}
代码示例来源:origin: stackoverflow.com
v.setTranslationY(300 * (float)Math.sin(angleRad));
v.setRotation(angleDeg + 90.0f);
main.addView(v);
代码示例来源:origin: stackoverflow.com
TextView tv = (TextView) findViewById(R.id.txtview);
String txt = "Stackoverflow";
tv.setText(txt);
tv.setRotation(45); // 45 degree rotation
代码示例来源:origin: stackoverflow.com
TextView t = (TextView) findViewById(R.id.txtview);
String txt = "Stackoverflow";
t.setText(txt);
t.setRotation(90); // 90 degree rotation
代码示例来源: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: MZCretin/RelativeLayoutDemo
textView.setTextSize(mtextSize);
textView.setTextColor(color);
textView.setRotation(rotate);
textView.setX(x - textView.getWidth());
textView.setY(y - textView.getHeight());
代码示例来源:origin: MZCretin/RelativeLayoutDemo
textView.setRotation(mAngle);
代码示例来源:origin: MZCretin/RelativeLayoutDemo
textView.setRotation(mAngle);
内容来源于网络,如有侵权,请联系作者删除!