0

is there any differences between layout_(property) and (property), like layout_width and width? When defining styles, there are two properties of width or height. I heard that normal width and height will set the value as a Pixel. but can we use it with layout_property, setting the value as px?

JunJaBoy
  • 25
  • 4
  • Similar question https://stackoverflow.com/questions/11181971/difference-between-androidwidth-and-androidlayout-width – ahjo4321hsotuhsa Sep 26 '22 at 08:08
  • In general you should never set `width` or `height`. You want to control tha layout of the `View` and to do that you use the `layout_*` properties. These values are used during the layout pass when determining the size and position of each `View` in the hierarchy. If you want to know more, have a look at [this](https://developer.android.com/guide/topics/ui/how-android-draws) or search for a description of how Android performs the layout of the `View` hierarchy. – David Wasser Sep 26 '22 at 09:35

0 Answers0