一.那到底什么是 rem 呢? 规范中明确写道: Equal to the computed value of ‘font-size’ on the root element. 「rem」是指根元素(root element,html)的字体大小,好开心的是,从遥远的 IE6 到版本帝 Chrome 他们都约好了,根元素默认的 font-size 都是 16px.这样一个新的单位兼容性如何呢?请出 Caniuse 看看吧 : 太好了,IE9+,Firefox.Chrome.Safari.Oper
TextView,很常见的控件.关于文字大小的方法有: android.widget.TextView#getTextSize 返回值的单位是PX /** * @return the size (in pixels) of the default text size in this TextView. */ @ViewDebug.ExportedProperty(category = "text") public float getTextSize() { return mTextP