By : Ketan Bhimani
140 int myResourceColor
=getResources().getColor(R.color.prettyTextColor);Working with DimensionsMany user interface layout controls such as text controls and
buttons are drawn to specific dimensions. These dimensions can be
stored as resources. Dimension values always end with a unit of
measurement tag.Dimension values are appropriately tagged with the <dimen> tag
and represent a name value pair. Dimension resources are defined
in XML under the /res/values project directory and compiled into
the application package at build time.The dimension units supported are shown in Table.Dimension Unit Measurements SupportedHere’s an example of a simple dimension resource file
/res/values/dimens.xml: