<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2021 The Android Open Source Project
  ~
  ~ 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"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/content_container"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <ImageView
            android:id="@+id/app_icon"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/sign_in_app_icon_top_margin"
            android:adjustViewBounds="true"
            android:maxHeight="@dimen/sign_in_app_icon_max_height"
            android:scaleType="fitXY"
            android:src="@drawable/ic_launcher"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <androidx.constraintlayout.widget.Guideline
            android:id="@+id/start_guideline"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            app:layout_constraintGuide_percent="@dimen/sign_in_horizontal_start_guideline" />

        <androidx.constraintlayout.widget.Guideline
            android:id="@+id/end_guideline"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            app:layout_constraintGuide_percent="@dimen/sign_in_horizontal_end_guideline" />

        <Button
            android:id="@+id/sign_in_button"
            style="@style/CarButton"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/sign_in_button1_top_margin_no_input"
            android:text="@string/sign_in_button"
            android:visibility="gone"
            app:layout_constraintEnd_toEndOf="@id/end_guideline"
            app:layout_constraintStart_toStartOf="@id/start_guideline"
            app:layout_constraintTop_toBottomOf="@id/app_icon"
            app:layout_constraintWidth_max="@dimen/sign_in_button_max_width" />

        <Button
            android:id="@+id/permissions_button"
            style="@style/CarButton"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/sign_in_button1_top_margin_no_input"
            android:text="@string/grant_permissions_button"
            android:visibility="gone"
            app:layout_constraintEnd_toEndOf="@id/end_guideline"
            app:layout_constraintStart_toStartOf="@id/start_guideline"
            app:layout_constraintTop_toBottomOf="@id/sign_in_button"
            app:layout_constraintWidth_max="@dimen/sign_in_button_max_width" />

        <Button
            android:id="@+id/notifications_button"
            style="@style/CarButton"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/sign_in_button1_top_margin_no_input"
            android:text="@string/notification_listener_button"
            android:visibility="gone"
            app:layout_constraintEnd_toEndOf="@id/end_guideline"
            app:layout_constraintStart_toStartOf="@id/start_guideline"
            app:layout_constraintTop_toBottomOf="@id/permissions_button"
            app:layout_constraintWidth_max="@dimen/sign_in_button_max_width" />

        <TextView
            android:id="@+id/help_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/sign_in_footer_top_margin"
            android:layout_marginBottom="@dimen/sign_in_footer_bottom_margin"
            android:adjustViewBounds="true"
            android:gravity="center"
            android:maxWidth="@dimen/sign_in_text_max_width"
            android:textAppearance="@style/SecondaryText"
            android:text="@string/sign_in_username_help_text"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toBottomOf="@id/notifications_button" />

    </androidx.constraintlayout.widget.ConstraintLayout>

</ScrollView>