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.
简单的问题:我想知道 EditText 的默认文本大小是多少。有人知道吗?
尝试
mEditText.getTextSize()
它将以 px 返回以在 sp 上转换
float scaledDensity = context.getResources().getDisplayMetrics().scaledDensity; sp = px/scaledDensity;