I know the effect of setting layout_width (or height) to 0dp in combination with layout_weight in a LinearLayout, as answered in this question:
Why is 0dp considered a performance enhancement?
However, in the example code on the Android developer guide here
http://developer.android.com/guide/topics/ui/layout/relative.html
Why do they set the layout_width of the Spinner to 0dp ? So what is exactly the reason or the trick behind this ? My guess for this is the horizontal position for the Spinner can already be determined by the relative attributes, so they just specify it as 0dp for the same reason as above case. However, I can't seem to find actual documentation on this so it's still a bit confusing.