fragment_active_list.xml 2.56 KB
<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <data>

        <import type="com.cnlive.gundam.main.ui.adapter.DataBindingAdapter" />

        <import type="android.support.v7.widget.LinearLayoutManager" />

        <variable
            name="layoutManager"
            type="LinearLayoutManager" />

        <variable
            name="listAdapter"
            type="DataBindingAdapter" />
    </data>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fitsSystemWindows="true">

        <include
            android:id="@+id/toolbarLayout"
            layout="@layout/layout_actionbar"/>

        <android.support.v4.widget.SwipeRefreshLayout
            android:layout_below="@+id/toolbarLayout"
            android:id="@+id/contentView"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent">

                <RelativeLayout
                    android:id="@+id/toobar"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">

                    <TextView
                        android:id="@+id/toobar_tv"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_centerInParent="true"
                        android:singleLine="true"
                        android:text="直播"
                        android:textColor="@color/config_black_color"
                        android:textSize="22sp" />

                    <View
                        android:layout_width="match_parent"
                        android:layout_height="1px"
                        android:layout_marginBottom="@dimen/_20px"
                        android:background="@color/gray_line_color" />
                </RelativeLayout>


                <android.support.v7.widget.RecyclerView
                    android:id="@+id/recyclerView"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_below="@+id/toobar"
                    app:adapter="@{listAdapter}"
                    app:layoutManager="@{layoutManager}" />
            </RelativeLayout>


        </android.support.v4.widget.SwipeRefreshLayout>

    </RelativeLayout>
</layout>