<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright 2019 bernd32
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:fillViewport="false">
<androidx.constraintlayout.widget.ConstraintLayout xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginBottom="8dp"
    tools:context=".ui.LauncherActivity">

    <include
        android:id="@+id/toolbar"
        layout="@layout/toolbar_main"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

    <Button
        android:id="@+id/button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="24dp"
        android:layout_marginEnd="24dp"
        android:onClick="onLoadLyrics"
        android:text="@android:string/search_go"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/spinner"
        android:drawableStart="@drawable/baseline_search_white_24"/>

    <EditText
        android:id="@+id/search_input"
        android:layout_width="0dp"
        android:layout_height="44dp"
        android:layout_marginStart="24dp"
        android:layout_marginTop="24dp"
        app:layout_constraintHorizontal_weight="3"
        android:hint="@string/search"
        android:importantForAutofill="no"
        android:inputType="textPersonName"
        app:layout_constraintEnd_toStartOf="@+id/spinner"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/toolbar" />

    <Spinner
        android:id="@+id/spinner"

        android:layout_width="0dp"
        android:layout_height="44dp"
        android:layout_marginStart="24dp"
        android:layout_marginTop="24dp"
        android:layout_marginEnd="24dp"
        android:layout_marginBottom="24dp"
        app:layout_constraintBottom_toTopOf="@+id/button"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_weight="2"
        app:layout_constraintStart_toEndOf="@+id/search_input"
        app:layout_constraintTop_toBottomOf="@+id/toolbar" />

    <Button
        android:id="@+id/detailed_search_button"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:layout_marginTop="24dp"
        android:layout_marginEnd="24dp"
        android:text="@string/detailed_search_show"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/button"
        android:onClick="onDetailedSearch" />

    <EditText
        android:id="@+id/artist_input"
        android:layout_width="0dp"
        android:layout_height="44dp"
        android:layout_marginStart="24dp"
        android:layout_marginTop="24dp"
        android:layout_marginEnd="0dp"
        android:hint="@string/artist"
        android:inputType="textPersonName"
        app:layout_constraintEnd_toStartOf="@+id/artist_spinner"
        app:layout_constraintHorizontal_weight="3"
        app:layout_constraintStart_toEndOf="@+id/artist_spinner"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/detailed_search_button"
        android:importantForAutofill="no" />

    <Spinner
        android:id="@+id/artist_spinner"
        android:layout_width="0dp"
        android:layout_height="44dp"
        android:layout_marginStart="24dp"
        android:layout_marginTop="24dp"
        android:layout_marginEnd="24dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_weight="2"
        app:layout_constraintStart_toEndOf="@+id/artist_input"
        app:layout_constraintTop_toBottomOf="@+id/detailed_search_button" />

    <EditText
        android:id="@+id/song_input"
        android:layout_width="0dp"
        android:layout_height="44dp"
        android:layout_marginStart="24dp"
        android:layout_marginTop="24dp"
        android:layout_marginEnd="0dp"
        android:hint="@string/song"
        android:importantForAutofill="no"
        android:inputType="textPersonName"
        app:layout_constraintEnd_toStartOf="@+id/song_spinner"
        app:layout_constraintHorizontal_weight="3"
        app:layout_constraintStart_toEndOf="@+id/song_spinner"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/artist_input" />

    <Spinner
        android:id="@+id/song_spinner"
        android:layout_width="0dp"
        android:layout_height="44dp"
        android:layout_marginStart="24dp"
        android:layout_marginTop="24dp"
        android:layout_marginEnd="24dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_weight="2"
        app:layout_constraintStart_toEndOf="@+id/song_input"
        app:layout_constraintTop_toBottomOf="@+id/artist_spinner" />

    <EditText
        android:id="@+id/lyrics_input"
        android:layout_width="0dp"
        android:layout_height="44dp"
        android:layout_marginStart="24dp"
        android:layout_marginTop="24dp"
        android:layout_marginEnd="0dp"
        android:hint="@string/lyrics"
        android:importantForAutofill="no"
        android:inputType="textPersonName"
        app:layout_constraintEnd_toStartOf="@+id/lyrics_spinner"
        app:layout_constraintHorizontal_weight="3"
        app:layout_constraintStart_toEndOf="@+id/lyrics_spinner"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/song_input" />

    <Spinner
        android:id="@+id/lyrics_spinner"
        android:layout_width="0dp"
        android:layout_height="44dp"
        android:layout_marginStart="24dp"
        android:layout_marginTop="24dp"
        android:layout_marginEnd="24dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_weight="2"
        app:layout_constraintStart_toEndOf="@+id/lyrics_input"
        app:layout_constraintTop_toBottomOf="@+id/song_spinner" />

    <androidx.constraintlayout.widget.Group
        android:id="@+id/group"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:visibility="gone"
        app:constraint_referenced_ids="lyrics_input,song_spinner,song_input,artist_spinner,artist_input,lyrics_spinner" />

</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>