作者:永不言败LM | 来源:互联网 | 2023-06-07 10:28
When I use
当我使用
android:textSizes="20dp"
in my XML for a textView, I got a warning "Should use "sp" instead of "dp" for text sizes."
在我的textView的XML中,我得到一个警告,“对于文本大小,应该使用sp而不是dp”。
Why should "dp" not be used? What is the correct approach? How can I achieve same textsizes on different displays?
为什么不应该使用“dp”?正确的方法是什么?如何在不同的显示器上实现相同的文本大小?
4 个解决方案