Выпадающий список, не перекрывающий messageInputConstraint

Как можно реализовать выпадающий список с участниками группы при вводе в текстовое поле символа «@» как в телеграме (примерно)?

BottomSheetDialogFragment не подходит, так как он перекрывает элементы ui, а нужно чтобы этот список был ниже клавиатуры.

макет:

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/mainContainerGroupMessageFrg"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/white"
    android:clickable="true"
    android:clipToPadding="false"
    android:focusable="true"
    tools:context=".mainscreen.messages.new_messenger.group_chat.GroupMessengerFragment">

    <LinearLayout
        android:id="@+id/linearLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:foreground="@drawable/pttrn_repeat"
        android:orientation="horizontal" />

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/top_bar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/background_top_bar_in_messanger"
        android:elevation="3dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <include layout="@layout/top_bar_in_group_messenger" />
    </androidx.constraintlayout.widget.ConstraintLayout>

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/fabGoToLastMessage"
        android:layout_width="70dp"
        android:layout_height="70dp"
        android:layout_marginEnd="16dp"
        android:layout_marginBottom="16dp"
        android:elevation="7dp"
        android:scaleX="0"
        android:scaleY="0"
        android:src="@drawable/ic_scrolldown"
        app:layout_constraintBottom_toBottomOf="@+id/container_recycler_view"
        app:layout_constraintEnd_toEndOf="parent" />

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/messageInputConstraint"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/background_for_bottom_panel_in_messenger"
        android:elevation="7dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.0"
        app:layout_constraintStart_toStartOf="parent">

        <androidx.appcompat.widget.LinearLayoutCompat
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent">

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/answerConstraint"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:scaleX="0"
                android:scaleY="0"
                android:visibility="gone">

                <include
                    android:id="@+id/answerInclude"
                    layout="@layout/answer_include_from_message_input" />
            </androidx.constraintlayout.widget.ConstraintLayout>

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/added_files_recycler"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="10dp"
                android:layout_marginTop="2dp"
                android:layout_marginBottom="2dp"
                android:scaleX="0"
                android:scaleY="0"
                android:visibility="gone" />

            <include
                android:id="@+id/include4"
                layout="@layout/message_input_include" />

        </androidx.appcompat.widget.LinearLayoutCompat>

    </androidx.constraintlayout.widget.ConstraintLayout>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/record_audio_include"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="8dp"
        android:layout_marginBottom="8dp"
        android:alpha="0"
        android:clickable="false"
        android:elevation="7dp"
        app:layout_constraintBottom_toBottomOf="@+id/linearLayout"
        app:layout_constraintEnd_toEndOf="parent">

        <include layout="@layout/include_audio_recording_btn" />
    </androidx.constraintlayout.widget.ConstraintLayout>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/lockVoiceInclude"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="16dp"
        android:layout_marginBottom="70dp"
        android:alpha="0"
        android:elevation="5dp"
        android:visibility="gone"
        app:layout_constraintBottom_toTopOf="@+id/messageInputConstraint"
        app:layout_constraintEnd_toEndOf="parent">

        <include layout="@layout/card_lock_voice_include" />
    </androidx.constraintlayout.widget.ConstraintLayout>

    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:id="@+id/coordinator_view_for_add_file"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:elevation="11dp"
        android:visibility="visible" />

    <RelativeLayout
        android:id="@+id/container_recycler_view"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        app:layout_constraintBottom_toTopOf="@+id/messageInputConstraint"
        app:layout_constraintEnd_toEndOf="@+id/linearLayout"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/top_bar">

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/messageList"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:clipToPadding="false"
            android:outlineProvider="bounds"
            android:overScrollMode="never"
            android:paddingTop="10dp"
            android:paddingBottom="10dp"
            app:layout_behavior="@string/appbar_scrolling_view_behavior" />

    </RelativeLayout>

    <include
        layout="@layout/include_pinned_message"
        android:layout_width="match_parent"
        android:layout_height="42dp"
        android:visibility="gone"
        app:layout_constraintTop_toBottomOf="@+id/top_bar"
        tools:visibility="visible" />

    <FrameLayout
        android:id="@+id/ivUnreadMessagesBackground"
        android:layout_width="wrap_content"
        android:layout_height="20dp"
        android:background="@drawable/background_new_message_count"
        android:elevation="10dp"
        android:paddingHorizontal="7dp"
        android:visibility="gone"
        app:layout_constraintBottom_toTopOf="@+id/fabGoToLastMessage"
        app:layout_constraintCircle="@id/fabGoToLastMessage"
        app:layout_constraintCircleAngle="45"
        app:layout_constraintCircleRadius="25dp"
        app:layout_constraintEnd_toEndOf="@+id/fabGoToLastMessage"
        app:layout_constraintStart_toStartOf="@+id/fabGoToLastMessage"
        app:layout_constraintTop_toTopOf="@+id/fabGoToLastMessage"
        tools:ignore="MissingConstraints">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/tvUnreadMessagesLabel"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:gravity="center_vertical"
                android:textColor="@color/white"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                tools:text="0" />
        </androidx.constraintlayout.widget.ConstraintLayout>

    </FrameLayout>

</androidx.constraintlayout.widget.ConstraintLayout>

Нужно чтобы список не перекрывал messageInputConstraint


Ответы (0 шт):