item_answer.xml 10.9 KB
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tool="http://schemas.android.com/tools"

    android:layout_width="match_parent"
    tool:visibility="visible"
    android:layout_height="match_parent"
    android:orientation="vertical"
    >
    <LinearLayout
        android:id="@+id/ll_exam_spreadOrfold"
        android:layout_width="60dp"
        android:layout_height="60dp"
        android:layout_marginBottom="-20dp"
        android:layout_gravity="right"
        android:visibility="gone"
        android:orientation="vertical">

    </LinearLayout>
    <CheckBox
        android:id="@+id/cb_exam_spreadOrfold"
        android:layout_width="45dp"
        android:layout_height="45dp"
        android:layout_marginBottom="-17dp"
        android:layout_gravity="right"
        android:button="@null"
        android:drawableRight="@drawable/selector_exam_fold"/>
    <!--<CheckBox-->
        <!--android:id="@+id/cb_exam_A"-->
        <!--style="@style/exam_cb_style_SingleOrMore"-->
        <!--android:drawableLeft="@drawable/selector_exam"-->
        <!--android:text="A" />-->
    <!--倒计时-->
    <RelativeLayout
        android:layout_width="match_parent"
        android:background="#e3e3e3"
        android:id="@+id/rel_exam_layout"
        android:layout_height="90dp">
        <RelativeLayout
            android:id="@+id/rel_home_tv_exam_countdown"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:orientation="vertical">
            <TextView
                android:id="@+id/tv_exam_countdown"
                android:layout_width="23dp"
                android:layout_height="15dp"
                android:layout_marginRight="5dp"
                android:layout_alignParentLeft="true"
                android:text="__s"
                android:textSize="12dp"
                android:textColor="@color/actionsheet_red"
                android:background="@color/white"
                />
        </RelativeLayout>
        <RelativeLayout
            android:layout_marginLeft="5dp"
            android:layout_toRightOf="@+id/rel_home_tv_exam_countdown"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            >
            <!--单选多选-->
            <LinearLayout
                android:id="@+id/ll_exam_SingleOrMore"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_toLeftOf="@+id/ll_exam_submit"
                android:gravity="center"
                android:visibility="gone"
                android:orientation="horizontal"
                >
                <CheckBox
                    android:id="@+id/cb_exam_A"
                    style="@style/exam_cb_style_SingleOrMore"
                    android:drawableLeft="@drawable/selector_exam"
                    android:text="A" />

                <CheckBox
                    android:id="@+id/cb_exam_B"
                    style="@style/exam_cb_style_SingleOrMore"
                    android:drawableLeft="@drawable/selector_exam"
                    android:text="B" />

                <CheckBox
                    android:id="@+id/cb_exam_C"
                    style="@style/exam_cb_style_SingleOrMore"
                    android:drawableLeft="@drawable/selector_exam"
                    android:text="C" />

                <CheckBox
                    android:id="@+id/cb_exam_D"
                    style="@style/exam_cb_style_SingleOrMore"
                    android:drawableLeft="@drawable/selector_exam"
                    android:text="D" />
            </LinearLayout>
            <!--对错-->
            <LinearLayout
                android:id="@+id/ll_exam_selectRightOrWrong"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_toLeftOf="@+id/ll_exam_submit"
                android:gravity="center"
                android:visibility="gone"
                tool:visibility="visible"
                android:orientation="horizontal"
                >
                <RadioGroup
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="horizontal"
                    >
                <RadioButton
                    android:id="@+id/rb_exam_R"
                    style="@style/exam_cb_style_RightOrWrong"
                    android:drawableLeft="@drawable/selector_exam"
                    android:checked="true"
                    android:text="对" />

                <RadioButton
                    android:id="@+id/rb_exam_W"
                    style="@style/exam_cb_style_RightOrWrong"
                    android:drawableLeft="@drawable/selector_exam"
                    android:text="错" />
                </RadioGroup>
            </LinearLayout>

            <LinearLayout
                android:id="@+id/ll_exam_filling"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_toLeftOf="@+id/ll_exam_submit"
                android:gravity="center"
                android:visibility="gone"
                android:orientation="horizontal"
                >
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:hint="一"
                    />
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:hint="二"
                    />

                <EditText
                    android:layout_width="20dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:maxLength="20"
                    android:singleLine="true"
                    android:hint="输入答案"
                    />
            </LinearLayout>


            <!--答案-->
            <LinearLayout
                android:id="@+id/ll_exam_answer"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_toLeftOf="@+id/ll_exam_submit"
                android:gravity="center|left"
                android:visibility="gone"
                tool:visibility="visible"
                android:orientation="vertical"
                >
                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal">
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="我的答案:"
                        />

                    <LinearLayout
                        android:id="@+id/ll_exam_Myanswer"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:gravity="center"
                        android:orientation="horizontal">
                    </LinearLayout>
                </LinearLayout>
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="5dp"
                    android:orientation="horizontal">
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="正确答案:"
                        />
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_centerInParent="true"
                        android:layout_margin="4dp"
                        android:background="@mipmap/lv_bj"
                        android:gravity="center"
                        android:textColor="@android:color/white"
                        android:text="C"
                        android:visibility="gone"
                        />
                    <LinearLayout
                        android:id="@+id/ll_exam_Correctanswer"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:gravity="center"
                        android:orientation="horizontal">
                    </LinearLayout>

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="10dp"
                        android:text="正确率:"
                        />
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="20%"
                        />
                </LinearLayout>

                </LinearLayout>
            <!--提交-->
            <LinearLayout
                android:id="@+id/ll_exam_submit"
                android:layout_width="100dp"
                android:layout_height="match_parent"
                android:orientation="horizontal"
                android:gravity="center"
                android:layout_marginLeft="10dp"
                android:layout_alignParentRight="true"
                >
                <TextView
                    android:id="@+id/tv_exam_up"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"

                    android:text="提交"
                    android:layout_gravity="center_vertical"
                    android:textColor="@android:color/white"
                    android:background="@drawable/shape_bg_full_circle_blue"
                  android:layout_marginRight="10dp"
                    android:textSize="12sp"
                    />
                <TextView
                    android:id="@+id/tv_exam_cancle"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="放弃"
                    android:layout_gravity="center_vertical"
                    android:textColor="@android:color/white"
                    android:background="@drawable/shape_bg_full_circle_grey"
                    android:layout_marginRight="8dp"
                    android:textSize="12sp"
                    />
            </LinearLayout>
        </RelativeLayout>
    </RelativeLayout>
    </LinearLayout>