<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/calendarWidgetRoot"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:animateLayoutChanges="true"
    android:clipChildren="false">


    <FrameLayout
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:clipChildren="false"
        android:clipToPadding="false"
        app:layout_constraintBottom_toBottomOf="@+id/calendarDatePrev"
        app:layout_constraintEnd_toStartOf="@+id/calendarDateNext"
        app:layout_constraintStart_toEndOf="@+id/calendarDatePrev"
        app:layout_constraintTop_toTopOf="@+id/calendarDatePrev">

        <TextView
            android:id="@+id/calendarDate"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_gravity="center"

            android:clickable="true"
            android:drawableEnd="@drawable/ic_arrow_drop_down"
            android:drawableTint="@color/text_color_primary"
            android:ellipsize="end"
            android:focusable="true"
            android:foreground="?selectableItemBackgroundBorderless"
            android:gravity="center"
            android:maxLines="1"
            android:text="@string/date_today"
            android:textAlignment="center"
            android:textAppearance="@style/TextAppearance.Heading1" />
    </FrameLayout>

    <ImageView
        android:id="@+id/calendarDateNext"
        style="?iconStyle"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:layout_alignParentTop="true"
        android:layout_alignParentEnd="true"
        android:clickable="true"
        android:focusable="true"
        android:foreground="?selectableItemBackgroundBorderless"
        android:padding="12dp"
        android:src="@drawable/ic_arrow_right"
        app:layout_constraintEnd_toStartOf="@+id/calendarOpenApp"
        app:layout_constraintTop_toTopOf="@+id/calendarDatePrev" />

    <ImageView
        android:id="@+id/calendarOpenApp"
        style="?iconStyle"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:layout_alignParentTop="true"
        android:layout_alignParentEnd="true"
        android:clickable="true"
        android:contentDescription="@string/calendar_widget_open_app"
        android:focusable="true"
        android:foreground="?selectableItemBackgroundBorderless"
        android:padding="12dp"
        android:src="@drawable/ic_open_external"
        app:tooltipText="@string/calendar_widget_open_app"
        android:tooltipText="@string/calendar_widget_open_app"
        app:layout_constraintEnd_toStartOf="@+id/calendarNewEvent"
        app:layout_constraintTop_toTopOf="@+id/calendarDatePrev" />

    <ImageView
        android:id="@+id/calendarNewEvent"
        style="?iconStyle"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:layout_alignParentTop="true"
        android:layout_alignParentEnd="true"
        android:layout_marginEnd="8dp"
        android:clickable="true"
        android:contentDescription="@string/calendar_widget_new_event"
        android:focusable="true"
        android:foreground="?selectableItemBackgroundBorderless"
        android:padding="12dp"
        android:src="@drawable/ic_add"
        android:tooltipText="@string/calendar_widget_new_event"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="@+id/calendarDatePrev" />

    <ImageView
        android:id="@+id/calendarDatePrev"
        style="?iconStyle"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:layout_alignParentTop="true"
        android:layout_alignParentEnd="true"
        android:layout_marginStart="8dp"
        android:layout_marginTop="8dp"
        android:clickable="true"
        android:focusable="true"
        android:foreground="?selectableItemBackgroundBorderless"
        android:padding="12dp"
        android:src="@drawable/ic_arrow_left"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/calendarUpcomingEventsTitle"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginEnd="16dp"
        android:text="@string/calendar_widget_pinned_events"
        android:textAppearance="@style/TextAppearance.Heading1"
        android:visibility="gone"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/calendarWidgetList" />

    <de.mm20.launcher2.ui.legacy.search.SearchListView
        android:id="@+id/calendarWidgetList"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:clipChildren="false"
        android:clipToPadding="false"
        android:padding="8dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.0"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/calendarDatePrev" />

    <de.mm20.launcher2.ui.legacy.search.SearchListView
        android:id="@+id/calendarWidgetPinnedList"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:clipChildren="false"
        android:clipToPadding="false"
        android:padding="8dp"
        android:visibility="gone"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.0"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/calendarUpcomingEventsTitle" />

</androidx.constraintlayout.widget.ConstraintLayout>