layout_input.xml 2.72 KB
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <View
        android:id="@+id/click_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_above="@+id/input_layout" />

    <ImageView
        android:layout_width="match_parent"
        android:layout_height="1px"
        android:layout_above="@+id/input_layout"
        android:background="#D5D5D5" />

    <LinearLayout
        android:id="@+id/input_layout"
        android:layout_width="match_parent"
        android:layout_height="48dp"
        android:layout_alignParentBottom="true"
        android:background="@android:color/white">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@android:color/white"
            android:paddingBottom="9dp"
            android:paddingTop="9dp">


            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="30dp"
                android:layout_centerVertical="true"
                android:layout_marginLeft="8dp"
                android:layout_toLeftOf="@+id/post_button"
                android:background="@drawable/edit_text"
                android:orientation="horizontal">

                <EditText
                    android:id="@+id/chat_content"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:background="@null"
                    android:gravity="center_vertical"
                    android:hint="我来说两句....."
                    android:imeOptions="actionSend"
                    android:inputType="textLongMessage"
                    android:maxLength="120"
                    android:paddingLeft="8dp"
                    android:textColor="#323333"
                    android:textColorHint="#969797"
                    android:textSize="16sp" />
            </LinearLayout>


            <ImageView
                android:id="@+id/post_button"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:layout_marginLeft="8dp"
                android:layout_marginRight="8dp"
                android:gravity="center"
                android:onClick="onClick"
                android:src="@drawable/chat_close_button"
                android:padding="4dp"
                android:textSize="10sp" />

        </RelativeLayout>

    </LinearLayout>
</RelativeLayout>