You can use dimens.xml like that. enter image description here
set your basic size and set other dimens.xml
<resources>
<dimen name="dp48_w360">51.200005dp</dimen>
<dimen name="dp13_w360">13.866668dp</dimen>
<dimen name="dp7_w360">7.466667dp</dimen>
<dimen name="dp10_w360">10.666667dp</dimen>
<dimen name="dp0_5_w360">0.53333336dp</dimen>
<dimen name="dp26_w360">28.000002dp</dimen>
<dimen name="dp15_w360">16.0dp</dimen>
<dimen name="dp22_5_w360">24.000002dp</dimen>
<dimen name="dp45_w360">48.000004dp</dimen>
<dimen name="dp133_w360">141.86667dp</dimen>
</resources>
or You'd better using sp.
for more detail, refer to https://android-developers.googleblog.com/2011/07/new-tools-for-managing-screen-sizes.html
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.