<?xml version="1.0" encoding="utf-8"?>
<layout 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">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <ProgressBar
            android:id="@+id/progressBar"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_gravity="center"
            tools:visibility="gone" />

        <androidx.coordinatorlayout.widget.CoordinatorLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:fitsSystemWindows="true">

            <ImageView
                android:id="@+id/konami"
                android:layout_width="90dp"
                android:layout_height="90dp"
                android:layout_gravity="bottom|end"
                android:visibility="gone"
                app:srcCompat="@drawable/emoji_glasses" />

            <com.google.android.material.appbar.AppBarLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:minHeight="?actionBarSize">

                <com.google.android.material.appbar.CollapsingToolbarLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:minHeight="?actionBarSize"
                    app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:orientation="vertical"
                        android:paddingBottom="?actionBarSize"
                        app:layout_collapseMode="parallax"
                        app:layout_collapseParallaxMultiplier="0.7">

                        <FrameLayout
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_gravity="center"
                            android:layout_marginTop="16dp">

                            <ImageView
                                android:id="@+id/szkolny"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_gravity="center"
                                android:scaleType="center"
                                android:scaleX="0.8"
                                android:scaleY="0.8"
                                android:src="@mipmap/ic_splash" />

                            <ImageView
                                android:id="@+id/glove"
                                android:layout_width="144dp"
                                android:layout_height="144dp"
                                android:layout_gravity="center"
                                android:paddingBottom="4dp"
                                android:visibility="gone"
                                app:srcCompat="@drawable/thanos_idle" />
                        </FrameLayout>

                        <TextView
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginHorizontal="64dp"
                            android:fontFamily="sans-serif-light"
                            android:gravity="center"
                            android:text="@string/app_name"
                            android:textAppearance="@style/NavView.TextView.Large"
                            android:textSize="28sp"
                            android:textStyle="bold" />

                        <TextView
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginHorizontal="64dp"
                            android:layout_marginBottom="48dp"
                            android:fontFamily="sans-serif-light"
                            android:gravity="center"
                            android:text="@string/contributors_headline"
                            android:textAppearance="@style/NavView.TextView.Medium" />
                    </LinearLayout>

                    <com.google.android.material.tabs.TabLayout
                        android:id="@+id/tabLayout"
                        android:layout_width="match_parent"
                        android:layout_height="?actionBarSize"
                        android:layout_gravity="bottom"
                        android:background="?android:colorBackground"
                        android:foreground="@color/colorSurface_2dp"
                        android:minHeight="?actionBarSize"
                        android:visibility="gone"
                        app:tabIndicatorColor="?colorPrimary"
                        app:tabMode="auto"
                        app:tabSelectedTextColor="?colorPrimary"
                        app:tabTextColor="?android:textColorPrimary"
                        tools:visibility="visible" />
                </com.google.android.material.appbar.CollapsingToolbarLayout>
            </com.google.android.material.appbar.AppBarLayout>

            <pl.szczodrzynski.edziennik.ui.base.lazypager.LazyViewPager
                android:id="@+id/viewPager"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:visibility="gone"
                app:layout_behavior="@string/appbar_scrolling_view_behavior"
                tools:visibility="visible" />
        </androidx.coordinatorlayout.widget.CoordinatorLayout>
    </LinearLayout>
</layout>
