//1.create different dimens.xml in different resource folders as below res/values-ldpi/dimens.xml res/values-mdpi/dimens.xml res/values-hdpi/dimens.xml //Then Android will decide which file to use. //2.Create dimensions values in respective dimens.xml file according to the need as below25dip // and..20dip // etc. // 3.Don't care about resolution Android will take care of which resource to fetch.// 4.Mention size in dp instead of pixels.