0

Boa tarde, pessoal!

Estou criando um aplicativo que contém uma activity com um chat. Porém, depois que faço o envio de algumas mensagens, o campo de texto fica sobreposto pelas mensagens.

O que posso fazer?

<LinearLayout
    android:id="@+id/lytHeader"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="50sp"
        android:background="@color/colorHeader">

        <ImageView
            android:id="@+id/imgLogo"
            android:layout_width="50dp"
            android:layout_height="50dp"
            android:layout_centerVertical="true"
            android:layout_marginStart="10dp"
            android:src="@mipmap/ic_launcher"/>

        <LinearLayout
            android:id="@+id/lytLabels"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_alignBottom="@+id/imgLogo"
            android:layout_alignTop="@+id/imgLogo"
            android:layout_centerVertical="true"
            android:layout_toEndOf="@+id/imgLogo"
            android:orientation="vertical">

            <TextView
                android:id="@+id/lblTitulo"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:text="Pessoa 2"
                android:textColor="#FFF"
                android:gravity="center_vertical"
                android:textSize="16sp"
                android:textStyle="bold" />
        </LinearLayout>

        <LinearLayout
            android:id="@+id/lytDivHeader"
            android:layout_width="match_parent"
            android:layout_height="3dp"
            android:layout_alignParentBottom="true"
            android:layout_alignParentTop="false"
            android:background="#000"
            android:orientation="vertical">
        </LinearLayout>
    </RelativeLayout>
</LinearLayout>

<LinearLayout
    android:id="@+id/lytChat"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentStart="true"
    android:layout_below="@+id/lytHeader">

    <ScrollView
        android:id="@+id/scrChat"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

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

            <android.support.v7.widget.RecyclerView
                android:id="@+id/rcvListaChat"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentStart="true"
                android:layout_alignParentTop="true">

            </android.support.v7.widget.RecyclerView>
        </RelativeLayout>
    </ScrollView>
</LinearLayout>

<LinearLayout
    android:id="@+id/myLinear"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom"
    android:layout_alignParentBottom="true"
    android:layout_alignParentLeft="true">

    <EditText
        android:id="@+id/edtMensagem"
        android:layout_width="match_parent"
        android:layout_height="40sp"
        android:text="123123"/>
</LinearLayout>

inserir a descrição da imagem aqui

2

0

Você deve fazer log-in para responder a esta pergunta.

Pesquise outras perguntas com a tag .