简体   繁体   中英

how set 50dp dimension for all android device using android different values folder

I want set height using values/dimens.xml if i want to set 50dp for values-mdpi/dimens.xml then how to calculate value for values-hdpi/dimens.xml, values-xhdpi/dimens.xml etc.

If i want to achieve below design for all android device how do I create an XML file and values/dimens.xml for all values folder

在此处输入图片说明

50dp is 50dp for all screen densities. dp stands for "density-independent pixels". So, put 50dp in values/dimens.xml , and you are done.

I think you are looking for this : SDP

Try this library for perfect design for all devices from small screen to tablet size. You don't need to write dimens file for all screen sizes.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM