<?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.bwei.monthsynthesize_demo.MainActivity"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <FrameLayout android:id="@+id/fl" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" /> <RadioGroup android:id="@+id/rg" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/rb1" android:layout_width="0dp" android:background="@drawable/bgcolor" android:layout_height="wrap_content" android:layout_weight="1" android:checked="true" android:button="@null" android:gravity="center" android:textSize="20sp" android:text="One" /> <RadioButton android:id="@+id/rb2" android:layout_width="0dp" android:background="@drawable/bgcolor" android:layout_height="wrap_content" android:layout_weight="1" android:button="@null" android:gravity="center" android:textSize="20sp" android:text="Two" /> <RadioButton android:id="@+id/rb3" android:layout_width="0dp" android:background="@drawable/bgcolor" android:layout_height="wrap_content" android:layout_weight="1" android:button="@null" android:gravity="center" android:textSize="20sp" android:text="Three" /> <RadioButton android:id="@+id/rb4" android:layout_width="0dp" android:background="@drawable/bgcolor" android:layout_height="wrap_content" android:layout_weight="1" android:button="@null" android:gravity="center" android:textSize="20sp" android:text="Four" /> <RadioButton android:id="@+id/rb5" android:layout_width="0dp" android:background="@drawable/bgcolor" android:layout_height="wrap_content" android:layout_weight="1" android:button="@null" android:gravity="center" android:textSize="20sp" android:text="Five" /> </RadioGroup> </LinearLayout> </android.support.constraint.ConstraintLayout>
FrameLayout和RadioGroup布局
最新推荐文章于 2022-01-08 15:44:39 发布