Android - Overlapping element

Asked

Viewed 21 times

0

Good afternoon, you guys!

I’m creating an app that contains an Activity with a chat. However, after I send some messages, the text field is overlaid by the messages.

What can I do?

<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

  • https://answall.com/questions/312842/ you have already asked a question, if you want you can edit it, you don’t need to create another

  • did not know, friend! thanks for the help!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.