<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto">
    <data>
        <variable
            name="viewModel"
            type="com.tommasoberlose.anotherwidget.ui.viewmodels.tabs.MediaInfoFormatViewModel" />
    </data>

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:background="@color/colorPrimaryDark">
        <com.google.android.material.card.MaterialCardView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:cardElevation="2dp"
            app:cardCornerRadius="0dp"
            android:id="@+id/toolbar"
            app:cardBackgroundColor="@color/colorPrimary">
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="56dp"
                android:gravity="center_vertical"
                android:paddingLeft="8dp"
                android:paddingRight="8dp">
                <androidx.appcompat.widget.AppCompatImageView
                    android:layout_width="48dp"
                    android:layout_height="48dp"
                    android:padding="12dp"
                    android:clickable="true"
                    android:focusable="true"
                    android:background="?attr/selectableItemBackgroundBorderless"
                    android:id="@+id/action_back"
                    app:tint="@color/colorPrimaryText"
                    android:src="@drawable/round_arrow_back_24" />
                <TextView
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:text="@string/settings_show_music_title"
                    android:paddingStart="8dp"
                    android:layout_marginEnd="48dp"
                    android:gravity="center"
                    style="@style/AnotherWidget.Main.Title"/>
            </LinearLayout>
        </com.google.android.material.card.MaterialCardView>
        <com.google.android.material.card.MaterialCardView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:cardElevation="2dp"
            app:cardCornerRadius="0dp"
            app:cardBackgroundColor="@color/colorPrimary">
            <com.google.android.material.card.MaterialCardView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:cardBackgroundColor="@color/colorPrimaryDark"
                app:cardCornerRadius="9dp"
                app:cardElevation="0dp"
                android:layout_marginTop="8dp"
                android:layout_marginLeft="16dp"
                android:layout_marginRight="16dp">
                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">
                    <EditText
                        android:layout_width="match_parent"
                        android:layout_height="48dp"
                        android:background="@color/colorPrimaryDark"
                        android:paddingStart="16dp"
                        android:paddingEnd="56dp"
                        android:id="@+id/media_info_format_input"
                        android:gravity="center_vertical|start"
                        android:textDirection="locale"
                        android:textAlignment="viewStart"
                        android:lines="1"
                        android:maxLines="1"
                        android:singleLine="true"
                        android:hint="@string/song_info_format_activity_title"
                        android:fontFamily="@font/google_sans"
                        android:text="@={viewModel.mediaInfoFormatInput}"
                        android:autofillHints=""
                        tools:ignore="TextFields" />
                </RelativeLayout>
            </com.google.android.material.card.MaterialCardView>
        </com.google.android.material.card.MaterialCardView>
        <com.google.android.material.card.MaterialCardView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:cardElevation="2dp"
            app:cardCornerRadius="0dp"
            app:cardBackgroundColor="@color/colorPrimary">
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:gravity="center_vertical"
                android:layout_marginTop="8dp"
                android:layout_marginBottom="16dp">
                <androidx.appcompat.widget.AppCompatTextView
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="48dp"
                    android:id="@+id/media_info_format_input_value"
                    android:textAppearance="@style/AnotherWidget.Settings.Title"
                    android:letterSpacing="0"
                    android:textColor="@color/colorPrimaryText"
                    android:textSize="18sp"
                    app:textAllCaps="false"
                    android:gravity="center_vertical|start"
                    android:textAlignment="viewStart"
                    android:maxLines="1"
                    android:lines="1"
                    android:singleLine="true"
                    android:ellipsize="end"
                    android:layout_marginLeft="32dp"
                    android:layout_marginRight="32dp" />
            </LinearLayout>
        </com.google.android.material.card.MaterialCardView>
        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1">
            <androidx.core.widget.ContentLoadingProgressBar
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:indeterminate="true"
                android:indeterminateTint="@color/colorAccent"
                android:layout_marginTop="-7dp"
                android:id="@+id/loader"
                style="@style/Widget.AppCompat.ProgressBar.Horizontal" />
            <androidx.recyclerview.widget.RecyclerView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:paddingBottom="64dp"
                android:paddingTop="16dp"
                android:clipToPadding="false"
                android:id="@+id/list_view" />
        </RelativeLayout>
    </LinearLayout>

</layout>