<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
       android:layout_width="match_parent"
       android:layout_height="wrap_content">

    <LinearLayout
        android:id="@+id/widgetWrapper"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:animateLayoutChanges="true"
        android:orientation="vertical">

        <FrameLayout
            android:id="@+id/widgetControlPanel"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:clipChildren="false"
            android:visibility="gone">

            <ImageView
                android:id="@+id/widgetDragHandle"
                style="?iconStyle"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:layout_marginStart="4dp"
                android:layout_marginEnd="4dp"
                android:focusable="true"
                android:foreground="?selectableItemBackgroundBorderless"
                android:padding="12dp"
                android:src="@drawable/ic_drag_handle"/>

            <ImageView
                android:id="@+id/widgetActionResize"
                style="?iconStyle"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:layout_gravity="end"
                android:layout_marginStart="4dp"
                android:layout_marginEnd="56dp"
                android:clickable="true"
                android:focusable="true"
                android:foreground="?selectableItemBackgroundBorderless"
                android:padding="12dp"
                android:src="@drawable/ic_widget_resize"/>

            <ImageView
                android:id="@+id/widgetActionSettings"
                style="?iconStyle"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:layout_gravity="end"
                android:layout_marginStart="4dp"
                android:layout_marginEnd="56dp"
                android:clickable="true"
                android:focusable="true"
                android:foreground="?selectableItemBackgroundBorderless"
                android:padding="12dp"
                android:src="@drawable/ic_settings"/>

            <ImageView
                android:id="@+id/widgetActionRemove"
                style="?iconStyle"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:layout_gravity="end"
                android:layout_marginStart="4dp"
                android:layout_marginEnd="4dp"
                android:clickable="true"
                android:focusable="true"
                android:foreground="?selectableItemBackgroundBorderless"
                android:padding="12dp"
                android:src="@drawable/ic_delete"/>
        </FrameLayout>

        <TextView
            android:id="@+id/widgetName"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="16dp"
            android:ellipsize="end"
            android:maxLines="1"
            android:textAppearance="@style/TextAppearance.AppCompat.Headline"
            android:visibility="gone"/>

        <de.mm20.launcher2.ui.legacy.view.WidgetResizeDragView
            android:id="@+id/widgetResizeDragHandle"
            style="?iconStyle"
            android:layout_width="match_parent"
            android:layout_height="24dp"
            android:layout_marginTop="4dp"
            android:layout_marginBottom="4dp"
            android:src="@drawable/ic_resize_drag_handle"
            android:visibility="gone"/>
    </LinearLayout>
</merge>