Rect rect= new Rect();
Paint textPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
textPaint.setTextAligh(Paint.Align.Right);
textPaint.setTextSize(12);
textPaint.getTextBounds("ABC", 0, "ABC".length(),rect);
int textHeight = rect.height();
int textWidth = textPaint.measureText("ABC");

 

相关文章:

  • 2021-06-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-15
  • 2022-01-08
  • 2022-01-08
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-04
  • 2022-01-08
  • 2021-11-18
  • 2022-01-08
相关资源
相似解决方案