Reputation: 15509
I do not know the difference between these two attributes and for the height also.
Take a TextView for example, what would happen if I set its layout_width to wrap_content and set its width to 50 dip?
Upvotes: 7
Views: 7197
Reputation: 927
There is a difference when using it in combination with layout_weight to fill a parent layout.
When using layout_weight on a TextView you need to set android:width to 0dip. Setting android:layout_width to 0dip will not work.
Upvotes: 4
Reputation: 73494
There is essentially no difference, only a TextView has the width property also.
Upvotes: 1