<?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"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/black"
    android:padding="24dp"
    tools:context=".ui.activity.main.AccessibilityActivity">

    <TextView
        android:id="@+id/title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/accessibility"
        android:textColor="@color/white"
        android:textSize="26sp"
        android:textStyle="bold"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/subtitle"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="8dp"
        android:gravity="center"
        android:text="@string/please_allow_auto_clicker_to_use_the_accessibility_service_for_app_features"
        android:textColor="#CCCCCC"
        android:textSize="14sp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/title" />

    <LinearLayout
        android:id="@+id/section_permission"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="24dp"
        android:orientation="horizontal"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/subtitle">

        <ImageView
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:layout_gravity="center"
            android:src="@drawable/accessibility_permission" />

        <TextView
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            android:layout_weight="1"
            android:text="@string/why_we_use_this_permission"
            android:textColor="@color/blue"
            android:textSize="20sp"
            android:textStyle="bold" />
    </LinearLayout>

    <TextView
        android:id="@+id/permission_explanation"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="8dp"
        android:text="@string/auto_clicker_uses_the_accessibility_service_api_to_enable_the_following_core_functionalities"
        android:textColor="@color/white"
        android:textSize="14sp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/section_permission" />

    <LinearLayout
        android:id="@+id/section_click"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:layout_marginStart="24dp"
        android:gravity="center_vertical"
        android:orientation="horizontal"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/permission_explanation">

        <ImageView
            android:layout_width="20dp"
            android:layout_height="20dp"
            android:src="@drawable/accessibility_click" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            android:text="@string/simulating_clicks_on_device_screen"
            android:textColor="@color/white"
            android:textSize="14sp" />
    </LinearLayout>

    <LinearLayout
        android:id="@+id/section_swipe"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="8dp"
        android:gravity="center_vertical"
        android:layout_marginStart="24dp"
        android:orientation="horizontal"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/section_click">

        <ImageView
            android:layout_width="20dp"
            android:layout_height="20dp"
            android:src="@drawable/accessibility_swipe" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            android:text="@string/simulating_swipes_on_device_screen"
            android:textColor="@color/white"
            android:textSize="14sp" />
    </LinearLayout>

    <TextView
        android:id="@+id/while_text"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:text="@string/while_app_is_running"
        android:textColor="@color/white"
        android:textSize="14sp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/section_swipe" />

    <View
        android:id="@+id/divider1"
        android:layout_width="0dp"
        android:layout_height="1dp"
        android:layout_marginTop="24dp"
        android:background="@color/gray"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/while_text" />

    <LinearLayout
        android:id="@+id/section_privacy"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:orientation="horizontal"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/divider1">

        <ImageView
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:layout_gravity="center"
            android:src="@drawable/accessibility_privacy" />

        <TextView
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            android:layout_weight="1"
            android:text="@string/do_we_collect_any_private_data"
            android:textColor="@color/blue"
            android:textSize="20sp"
            android:textStyle="bold" />
    </LinearLayout>

    <TextView
        android:id="@+id/privacy_detail"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="8dp"
        android:text="@string/no_we_do_not_collect_any_private_data_through_this_permission"
        android:textColor="@color/white"
        android:textSize="14sp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/section_privacy" />

    <View
        android:id="@+id/divider2"
        android:layout_width="0dp"
        android:layout_height="1dp"
        android:layout_marginTop="24dp"
        android:background="@color/gray"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/privacy_detail" />

    <LinearLayout
        android:id="@+id/section_how"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:orientation="horizontal"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/divider2">

        <ImageView
            android:layout_width="24dp"
            android:layout_gravity="center"
            android:layout_height="24dp"
            android:src="@drawable/accessibility_guide" />

        <TextView
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            android:layout_weight="1"
            android:text="@string/how_to_enable_permission"
            android:textColor="@color/blue"
            android:textSize="20sp"
            android:textStyle="bold" />
    </LinearLayout>

    <TextView
        android:id="@+id/how_detail"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="8dp"
        android:text="@string/please_tap_agree_button_then_choose_auto_clicker_in_the_app_list_and_enable_the_accessibility_permission"
        android:textColor="@color/white"
        android:textSize="14sp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/section_how" />

    <androidx.appcompat.widget.AppCompatButton
        android:id="@+id/btn_tutorial"
        android:layout_width="160dp"
        android:layout_height="26dp"
        android:layout_marginTop="16dp"
        android:background="@drawable/btn_border_background"
        android:textSize="14sp"
        android:paddingEnd="5dp"
        android:paddingStart="10dp"
        android:drawablePadding="5dp"
        android:drawableStart="@drawable/accessibility_question"
        android:text="@string/watch_tutorial"
        android:textColor="@color/white"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="@id/how_detail" />

    <LinearLayout
        android:id="@+id/bottom_buttons"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="32dp"
        android:gravity="center"
        android:orientation="horizontal"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/btn_tutorial">

        <androidx.appcompat.widget.AppCompatButton
            android:id="@+id/btn_agree"
            android:layout_width="123dp"
            android:layout_height="43dp"
            android:layout_marginEnd="8dp"
            android:background="@drawable/btn_border_background"
            android:backgroundTint="@color/blue"
            android:text="@string/agree"
            android:textColor="@color/white" />

        <androidx.appcompat.widget.AppCompatButton
            android:id="@+id/btn_later"
            android:layout_width="123dp"
            android:layout_height="43dp"
            android:layout_marginStart="50dp"
            android:background="@drawable/btn_border_background"
            android:text="@string/not_now"
            android:textColor="@color/white" />
    </LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>
