<?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:layout_marginHorizontal="48dp"
    android:layout_marginVertical="27dp"
    tools:context=".ui.startup.StartupActivity">

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/center"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:orientation="vertical"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintGuide_percent="0.5"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/title"
        style="@style/TextAppearance.Leanback.Title"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:text="@string/lbl_enter_server_address"
        app:layout_constraintEnd_toStartOf="@id/center"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/address_label"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:text="@string/lbl_valid_server_address"
        app:layout_constraintEnd_toStartOf="@id/center"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/title" />

    <EditText
        android:id="@+id/address"
        style="@style/Input.Default"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="8dp"
        android:imeOptions="actionDone"
        android:inputType="textUri"
        android:nextFocusDown="@id/confirm"
        android:nextFocusForward="@id/confirm"
        android:privateImeOptions="horizontalAlignment=right"
        app:layout_constraintEnd_toStartOf="@id/center"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/address_label" />

    <Button
        android:id="@+id/confirm"
        style="@style/Button.Default"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:text="@string/action_connect"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/address" />

    <TextView
        android:id="@+id/error"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        app:layout_constraintEnd_toStartOf="@id/center"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/confirm"
        tools:text="@string/server_connecting" />
</androidx.constraintlayout.widget.ConstraintLayout>
