Every Android application has a certain theme, we need to assign some width, height, margin and padding to different views such as button, textview, edittext etc...
Also we need to take care that all the buttons in the app look similar, same with edittext and textviews. So, we need to follow certain rules related to width, height, margin and padding.
If we assign all the display properties to all the views separately, then it will :
1. Be more prone to errors.
2. Be time consuming.
3. Produce lengthy code.
Hence developers of Android platform has provides us with readymade files such as values.xml, styles.xml, strings.xml and dimens.xml. Here you can define how different views are going to look
The file dimens.xml is used to hold different dimensions like width, height, margin and padding.