fragment_ugc_chat.xml 3.62 KB
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <data>

        <variable
            name="messageAdapter"
            type="com.cnlive.gundam.video.adpter.CommonAdapter" />

        <variable
            name="giftAdapter"
            type="com.cnlive.gundam.video.adpter.GiftAdapter" />
    </data>

    <RelativeLayout
        android:id="@+id/lin"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@android:color/transparent">


        <ListView
            android:id="@+id/list_message"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_above="@+id/edit_layout"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:divider="@null"
            android:scrollbars="none"
            android:stackFromBottom="true"
            android:transcriptMode="alwaysScroll"
            app:Adapter="@{messageAdapter}" />


        <RelativeLayout
            android:id="@+id/edit_layout"
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:background="#22555756"
            android:orientation="horizontal"
            android:layout_alignParentBottom="true"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true">

            <ImageView
                android:padding="4dp"
                android:id="@+id/sendMessage"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:layout_marginLeft="5dp"
                android:src="@drawable/btn_send_message" />


            <ImageView
               android:layout_marginRight="20dp"
                android:layout_alignParentRight="true"
                android:id="@+id/img_gift"
                android:padding="6dp"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:src="@drawable/gift" />

            <android.support.v7.widget.SwitchCompat
                android:visibility="gone"
                android:id="@+id/barrage"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:background="@null"
                android:textIsSelectable="false"
                android:thumb="@drawable/switch_thumb"
                app:switchMinWidth="30dp"
                app:track="@drawable/switch_track" />


        </RelativeLayout>


        <!--<RelativeLayout-->
            <!--android:id="@+id/rl_gift"-->
            <!--android:layout_width="match_parent"-->
            <!--android:layout_height="wrap_content"-->
            <!--android:layout_above="@id/edit_layout"-->
            <!--android:background="#979797"-->
            <!--android:visibility="invisible">-->

            <!--<android.support.v7.widget.RecyclerView-->
                <!--android:padding="5dp"-->
                <!--android:id="@+id/recycler_gift"-->
                <!--android:layout_width="match_parent"-->
                <!--android:layout_height="wrap_content"-->
                <!--app:adapter="@{giftAdapter}" />-->

        <!--</RelativeLayout>-->


    </RelativeLayout>


</layout>