In a horizontal LinearLayout, two buttons with width 0dp and weights 1 and 2 share the width in the ratio:

  1. 1 : 2
  2. 2 : 1
  3. 1 : 1
  4. 0 : 3
Answer

A) 1 : 2

Weights distribute remaining space proportionally.

Computer Science MCQ · More Screen Components and Orientation MCQs · Practise