android TextView setEms 方法名字

来源:互联网 发布:pascal 编程指针 编辑:程序博客网 时间:2024/06/05 07:22

android TextView setEms 方法名字

 4110人阅读 评论(4) 收藏 举报
 分类:
 

Android TextView setEms() 作用是设置textview的字符宽度。但是名字很奇怪。

 

[java] view plain copy
  1. /** 
  2.  * Makes the TextView exactly this many ems wide 
  3.  * 
  4.  * @attr ref android.R.styleable#TextView_ems 
  5.  */  
  6. @android.view.RemotableViewMethod  
  7. public void setEms(int ems) {  
  8.     mMaxWidth = mMinWidth = ems;  
  9.     mMaxWidthMode = mMinWidthMode = EMS;  
  10.   
  11.     requestLayout();  
  12.     invalidate();  
  13. }  

 

[html] view plain copy
  1. An em is a unit in the field of typography  

 

em是一个印刷排版的单位,表示字宽的单位。 em字面意思为:equal M   (和M字符一致的宽度为一个单位)简称em。

 ems是em的复数表达。


em 的具体来历? 

http://en.wikipedia.org/wiki/Em_%28typography%29


0 0