<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright 2023 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     https://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
-->
<androidx.constraintlayout.widget.ConstraintLayout 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"
    android:padding="32dp"
    tools:context=".DragAndDropActivity">

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/guideline_center"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        app:layout_constraintGuide_percent="0.5" />

    <androidx.appcompat.widget.AppCompatButton
        android:id="@+id/button_new_task"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:padding="20dp"
        android:text="@string/new_task"
        android:textAlignment="center"
        android:textAppearance="@style/TextAppearance.AppCompat.Large"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/text_drag_item"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginEnd="8dp"
        android:background="@drawable/bg_drag_normal"
        android:padding="20dp"
        android:text="@string/drag_item"
        android:textAlignment="center"
        android:textAppearance="@style/TextAppearance.AppCompat.Large"
        app:layout_constraintBottom_toTopOf="@+id/guideline_center"
        app:layout_constraintEnd_toStartOf="@id/text_drag_image"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/button_new_task" />

    <TextView
        android:id="@+id/text_drag_image"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:text="@string/drag_image"
        android:textAppearance="@style/TextAppearance.AppCompat.Large"
        app:layout_constraintBottom_toBottomOf="@id/text_drag_item"
        app:layout_constraintStart_toEndOf="@id/text_drag_item"
        app:layout_constraintTop_toTopOf="@id/text_drag_item" />

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/image_drag_item"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:layout_marginStart="8dp"
        android:adjustViewBounds="true"
        android:src="@drawable/earth"
        app:layout_constraintBottom_toBottomOf="@id/text_drag_item"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/text_drag_image"
        app:layout_constraintTop_toTopOf="@id/text_drag_item" />

    <TextView
        android:id="@+id/text_drop_target"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:background="@drawable/bg_target_normal"
        android:gravity="center_horizontal|center_vertical"
        android:padding="20dp"
        android:text="@string/drop_target"
        android:textAlignment="center"
        android:textAppearance="@style/TextAppearance.AppCompat.Large"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.0"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@+id/guideline_center" />

    <androidx.appcompat.widget.AppCompatImageButton
        android:id="@+id/button_clear"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:background="?attr/selectableItemBackgroundBorderless"
        android:src="@drawable/ic_clear"
        app:layout_constraintEnd_toEndOf="@id/text_drop_target"
        app:layout_constraintTop_toTopOf="@id/text_drop_target" />

</androidx.constraintlayout.widget.ConstraintLayout>
