Search code examples
androiddpi

Usage of Dp in Android


I have an issue regarding usage of "dp".
In which context dp can be used? Is it just used for any controls i.e ImageView and TextView, or it can be used for adjusting layouts as well.
For adjusting layouts I'am currently specifying width and height of the controls in terms of percentage of the screens width and height.


Solution

  • it can used as unit to specify width and height.. you can use it with all views...see this for more..