我想通过编程实现类似以下的功能 -
<LinearLayout>
<RelativeLayout1 weight = 1>
<RelativeLayout2 weight = 3>
<RelativeLayout3 weight = 1>
<LinearLayout>
我无法通过编程方式设置权重(setWeight)。但是,我看到RelativeLayout在XML中有一个android:layout_weight参数。我是否遗漏了什么?
我想通过编程实现类似以下的功能 -
<LinearLayout>
<RelativeLayout1 weight = 1>
<RelativeLayout2 weight = 3>
<RelativeLayout3 weight = 1>
<LinearLayout>
我无法通过编程方式设置权重(setWeight)。但是,我看到RelativeLayout在XML中有一个android:layout_weight参数。我是否遗漏了什么?