<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="co.huggingface.android_transformers.bertqa.ui.QaActivity">

  <TextView
      android:id="@+id/title_text"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:padding="@dimen/standard_margin"
      app:layout_constraintTop_toTopOf="parent"
      android:text="Here is the title of article"
      android:textStyle="bold"/>

  <androidx.coordinatorlayout.widget.CoordinatorLayout
      android:layout_width="match_parent"
      android:layout_height="0dp"
      app:layout_constraintTop_toBottomOf="@id/title_text"
      app:layout_constraintBottom_toTopOf="@id/footer_view">
    <TextView
        android:id="@+id/content_text"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:padding="@dimen/standard_margin"
        android:scrollbars="vertical"
        android:text="This is the content of the article."/>
  </androidx.coordinatorlayout.widget.CoordinatorLayout>

  <androidx.constraintlayout.widget.ConstraintLayout
      android:id="@+id/footer_view"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:padding="@dimen/standard_margin"
      app:layout_constraintBottom_toBottomOf="parent"
      android:elevation="@dimen/bottom_sheet_elevation"
      android:background="@android:color/white">

    <TextView
        android:id="@+id/suggestion_text"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintTop_toTopOf="parent"
        android:text="@string/you_might_want_to_ask"/>

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/suggestion_list"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintTop_toBottomOf="@id/suggestion_text"/>

    <com.google.android.material.textfield.TextInputLayout
        android:id="@+id/text_input_layout"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        app:layout_constraintTop_toBottomOf="@id/suggestion_list"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintRight_toLeftOf="@id/ask_button"
        app:layout_constraintLeft_toLeftOf="parent"
        android:hint="@string/text_query">

      <com.google.android.material.textfield.TextInputEditText
          android:id="@+id/question_edit_text"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:inputType="text"
          android:maxLines="3"/>

    </com.google.android.material.textfield.TextInputLayout>

    <ImageButton
        android:id="@+id/ask_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:padding="@dimen/standard_margin"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="@id/text_input_layout"
        app:layout_constraintBottom_toBottomOf="@id/text_input_layout"
        android:src="@drawable/ic_ask_inactive"
        android:clickable="false"
        android:background="?attr/selectableItemBackgroundBorderless"
        android:contentDescription="@string/ask_question" />

  </androidx.constraintlayout.widget.ConstraintLayout>

</androidx.constraintlayout.widget.ConstraintLayout>
