<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<androidx.coordinatorlayout.widget.CoordinatorLayout
    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">

    <androidx.constraintlayout.motion.widget.MotionLayout
        android:id="@+id/homeLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="?homeBackground"
        app:layoutDescription="@xml/home_scene"
        tools:context=".home.HomeFragment">

        <ImageButton
            android:id="@+id/privateBrowsingButton"
            android:layout_width="@dimen/glyph_button_height"
            android:layout_height="@dimen/glyph_button_height"
            android:layout_marginEnd="12dp"
            android:background="?android:attr/selectableItemBackgroundBorderless"
            android:contentDescription="@string/content_description_private_browsing_button"
            android:src="@drawable/private_browsing_button"
            app:layout_constraintBottom_toTopOf="@+id/wordmark"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <ImageView
            android:id="@+id/wordmark"
            android:layout_width="wrap_content"
            android:layout_height="80dp"
            android:layout_marginStart="16dp"
            android:layout_marginTop="60dp"
            android:layout_marginBottom="32dp"
            android:adjustViewBounds="true"
            android:clickable="false"
            android:contentDescription="@string/app_name"
            android:focusable="false"
            android:importantForAccessibility="no"
            android:src="?fenixLogo"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <FrameLayout
            android:id="@+id/wordmark_spacer"
            android:layout_marginTop="32dp"
            android:layout_width="0dp"
            android:layout_height="0dp"
            app:layout_constraintTop_toBottomOf="@id/wordmark"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintEnd_toStartOf="parent" />

        <View
            android:id="@+id/bottomBarShadow"
            android:layout_width="0dp"
            android:layout_height="1dp"
            android:background="@color/bottom_bar_shadow"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintBottom_toTopOf="@id/bottom_bar"/>

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/bottom_bar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="?bottomBarBackground"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent">

            <org.mozilla.fenix.home.SearchView
                android:id="@+id/toolbar_wrapper"
                android:transitionName="toolbar_wrapper_transition"
                android:layout_width="0dp"
                android:layout_height="40dp"
                android:layout_margin="8dp"
                android:background="@drawable/home_search_background_normal"
                android:clickable="true"
                android:contentDescription="@string/search_hint"
                android:focusable="true"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toStartOf="@+id/add_tab_button"
                app:layout_constraintStart_toStartOf="parent">

                <ImageView
                    android:id="@+id/search_engine_icon"
                    android:layout_width="24dp"
                    android:layout_height="24dp"
                    android:layout_marginStart="12dp"
                    android:layout_gravity="start|center_vertical"
                    android:clickable="false"
                    android:focusable="false"
                    android:importantForAccessibility="no" />

                <TextView
                    android:id="@+id/toolbar"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="start|center_vertical"
                    android:layout_marginStart="44dp"
                    android:clickable="false"
                    android:focusable="false"
                    android:importantForAccessibility="no"
                    android:text="@string/search_hint"
                    android:textColor="?primaryText"
                    android:textSize="15sp" />
            </org.mozilla.fenix.home.SearchView>

            <ImageButton
                android:id="@+id/add_tab_button"
                android:layout_width="40dp"
                android:layout_height="40dp"
                android:background="?android:attr/selectableItemBackgroundBorderless"
                android:contentDescription="@string/add_tab"
                android:src="@drawable/ic_new"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toStartOf="@+id/menuButton"
                app:layout_constraintStart_toEndOf="@id/toolbar_wrapper"
                app:layout_constraintTop_toTopOf="parent" />

            <ImageButton
                android:id="@+id/menuButton"
                android:layout_width="40dp"
                android:layout_height="40dp"
                android:layout_marginEnd="6dp"
                android:background="?android:attr/selectableItemBackgroundBorderless"
                android:contentDescription="@string/content_description_menu"
                android:src="@drawable/ic_menu"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintBottom_toBottomOf="parent"/>

        </androidx.constraintlayout.widget.ConstraintLayout>

    </androidx.constraintlayout.motion.widget.MotionLayout>

</androidx.coordinatorlayout.widget.CoordinatorLayout>