getDimenInDP

Get dimension dp value from your xml. When you use Resources.getDimension you get the amount of pixels for that dimen. This function returns a proper dp value just like what you wrote in your dimen.xml