android TextView setEms 方法名字
16lz
2021-01-23
android TextView setEms() 作用是设置textview的字符宽度。但是名字很奇怪。
/** * Makes the TextView exactly this many ems wide * * @attr ref android.R.styleable#TextView_ems */ @android.view.RemotableViewMethod public void setEms(int ems) { mMaxWidth = mMinWidth = ems; mMaxWidthMode = mMinWidthMode = EMS; requestLayout(); invalidate(); }
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
更多相关文章
- android 限定 EditText字符输入个数
- Android的字符编码转换问题,Unicode,GB2312,UTF8等
- Android:电话拨号器、呼叫记录、结束通话、Android显示单位
- Android长度单位详解(dp、sp、px、in、pt、mm、dip)
- 【简单的学生管理界面】Android的if语句中有字符串判断
- android实现json数据的解析和把数据转换成json格式的字符串
- Android 时间字符串 转成UTC时间转为指定时间的时间字符串
- Android系统开发小问题-启动过程中android字符没有显示出来 .
- android 字符串数组资源