我的布局是这样的
<ParentLinearlayout>
<ChildLinearlayout>
<Button>
</ChildLinearlayout>
<ChildLinearlayout>
<Button>
</ChildLinearlayout>
</ParentLinearlayout1>
ChildLinearlayout的数量被改变,动态添加和删除。
单击按钮时,我想删除作为 Button 父级的 ChildLinearlayout。
但我不知道索引线性布局。索引经常改变,因此不能使用标签。
如何知道 LinearLayout 索引?