FrameLayout和RadioGroup布局

来源:互联网 发布:网络动漫黑名单 编辑:程序博客网 时间:2024/05/19 20:21
<?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>