Java代码
  1. Paint mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG);   
  2. mTextPaint.setColor(Color.WHITE);   
  3. // Define the string.   
  4. String displayText = “Hello World!”;   
  5. // Measure the width of the text string.   
  6. float textWidth = mTextPaint.measureText(displayText);  

相关文章:

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