🌈 搜索
📅  最后修改于: 2022-03-11 14:57:13.346000             🧑  作者: Mango
float scale = getResources().getDisplayMetrics().density; int dpAsPixels = (int) (sizeInDp*scale + 0.5f);