Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法以编程方式获取视图的 minEMS?
我将它设置在我的布局文件中,但我需要在代码中的某个位置从中获取这个值。我不知道如何
谢谢
TextView v = (TextView) findViewById(R.id.yourviewid); int maxEMS = v.getMaxEms(); int minEMS = v.getMinEms();
getMaxEms ()和getMinEms()方法在具有 EMS 属性的视图中可用,例如TextView.
TextView