如上图。
//@null是去掉边框
<RadioGroup
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/event_icon"
android:text="事件"
android:button="@null"
/>
<!--设置background="@null"去掉原来的那条线-->
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请输入事件名称"
android:gravity="right"
android:background="@null"
/>
</RadioGroup>
<!--重新画一条线-->
<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_margin="5dp"
android:background="@android:color/darker_gray" />