02.详细属性
设置单选框排列方向
- 使用 dir="h" 设置单选框横向排列(默认是竖向排列的)
<ui>
<linear gravity="center" h="max" padding="20" w="max">
<radio-group dir="h" w="max">
<radio text="单选1"/>
<radio text="单选2"/>
<radio text="单选3"/>
</radio-group>
</linear>
</ui>
设置背景颜色
- 使用bg="#44548AF7" 设置单选框背景颜色
<ui>
<linear gravity="center" h="max" padding="20" w="max">
<radio-group bg="#44548AF7" w="max">
<radio text="单选1"/>
<radio text="单选2"/>
<radio text="单选3"/>
</radio-group>
</linear>
</ui>