<?xml version="1.0" encoding="utf-8"?>
<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:layout_width="match_parent"
  android:layout_height="match_parent"
  android:fitsSystemWindows="true"
  tools:context=".webserver.ZimHostFragment">

  <include layout="@layout/layout_toolbar" />

  <TextView
    android:id="@+id/serverTextView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginStart="16dp"
    android:layout_marginTop="16dp"
    android:layout_marginEnd="50dp"
    android:autoLink="web"
    android:text="@string/server_textview_default_message"
    app:layout_constraintEnd_toStartOf="@id/shareServerUrlIcon"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/toolbar" />

  <ImageView
    android:id="@+id/shareServerUrlIcon"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginTop="3dp"
    android:layout_marginEnd="16dp"
    android:contentDescription="@string/share_host_address"
    android:src="@drawable/ic_share_35dp"
    android:visibility="gone"
    app:layout_constraintBottom_toBottomOf="@id/serverTextView"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintTop_toTopOf="@id/serverTextView"
    tools:visibility="visible" />

  <androidx.recyclerview.widget.RecyclerView
    android:id="@+id/recyclerViewZimHost"
    android:layout_width="0dp"
    android:layout_height="0dp"
    android:layout_marginTop="16dp"
    android:layout_marginBottom="8dp"
    app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
    app:layout_constraintBottom_toTopOf="@+id/startServerButton"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/serverTextView"
    tools:listitem="@layout/item_book" />

  <Button
    android:id="@+id/startServerButton"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginStart="8dp"
    android:layout_marginLeft="8dp"
    android:layout_marginEnd="8dp"
    android:layout_marginRight="8dp"
    android:layout_marginBottom="8dp"
    android:backgroundTint="@color/startServerGreen"
    android:text="@string/start_server_label"
    android:textColor="@color/white"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
