android TextView setEms 方法名字
16lz
2022-04-22
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 代码中设置字体大小
- Android(安卓)使用正则表达式
- android 限定 EditText字符输入个数
- android之autoCompleteTextView
- Android(安卓)自定义UI--电池
- android 随手记 --byte String inputstream 之间的转换
- Android(安卓)InputStream与String,Byte之间互转
- 【android】利用Yahoo API完成天气预报
- android 限定 EditText字符输入个数