Katedral Pillon
Katedral Pillon

Reputation: 14844

LinearLayout weight choices

Why would someone use weights 2:4 instead of weights 1:2? I am looking through a Udacity course layout. It's a LinearLayout with two children views. and the children are given weights 2 and 4 respectively as opposed to 1 and 2. Why is that?

Upvotes: 2

Views: 44

Answers (1)

Gabe Sechan
Gabe Sechan

Reputation: 93542

Because they wanted to? The actual values don't matter, the ratios are all that does. Usually when you see that its code that evolved over time, they originally had something in there with weight 1 and removed it (while weights don't need to be whole number, most people try to keep them that way).

Upvotes: 1

Related Questions