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

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

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

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

相关文章

TextView类方法