текстовое поле для ввода данных:
version="1.0"
encoding="utf-8"?>
xmlns:android=" http://schemas.android.com/apk/res/android
xmlns:android="
"
http://schemas.android.com/apk/res-auto
android:layout_width="match_parent"
android:layout_height="match_parent">
android:id="@+id/newContact"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@id/addBtn"
app:layout_constraintTop_toTopOf="parent"
/>
android:id="@+id/addBtn"
android:text="Add"
android:layout_width="wrap_content"
android:onClick="onAddContact"
app:layout_constraintBottom_toTopOf="@id/header"
app:layout_constraintLeft_toRightOf="@id/newContact"
app:layout_constraintRight_toRightOf="parent"
android:id="@+id/header"
android:text="Контакты"
android:textSize="18sp"
app:layout_constraintBottom_toTopOf="@id/contactList"
app:layout_constraintTop_toBottomOf="@id/newContact"
android:id="@+id/contactList"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/header"
В коде