<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tool="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

    <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_margin="12dp"
            android:orientation="vertical">

        <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="40dp"
                android:id="@+id/title_bar"
                android:background="@drawable/floating_console_bg_top"
                android:orientation="horizontal">

            <TextView
                    android:id="@+id/title"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_marginStart="16dp"
                    android:layout_weight="1"
                    android:ellipsize="end"
                    android:gravity="center_vertical|start"
                    android:maxLines="1"
                    android:text="@string/text_console"
                    android:textColor="@android:color/white"
                    android:textSize="16sp" />

            <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent">

                <ImageView
                        android:id="@+id/minimize"
                        android:layout_width="40dp"
                        android:layout_height="40dp"
                        android:background="?selectableItemBackgroundBorderless"
                        android:paddingBottom="8dp"
                        android:paddingStart="8dp"
                        android:paddingEnd="8dp"
                        android:paddingTop="24dp"
                        android:scaleType="center"
                        android:src="@drawable/ic_remove_white_24dp"
                        app:tint="@android:color/white" />

                <ImageView
                        android:id="@+id/move_or_resize"
                        android:layout_width="40dp"
                        android:layout_height="40dp"
                        android:background="?selectableItemBackgroundBorderless"
                        android:padding="8dp"
                        android:scaleType="fitXY"
                        android:src="@drawable/ic_settings_ethernet_white_24dp"
                        app:tint="@android:color/white" />

                <ImageView
                        android:id="@+id/close"
                        android:layout_width="40dp"
                        android:layout_height="40dp"
                        android:background="?selectableItemBackgroundBorderless"
                        android:padding="8dp"
                        android:scaleType="fitXY"
                        android:src="@drawable/ic_close_white_24dp"
                        app:tint="@android:color/white" />
            </LinearLayout>

        </LinearLayout>

        <org.autojs.autojs.core.console.FloatingConsoleView
                android:id="@+id/console"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@drawable/floating_console_bg_bottom"
                android:padding="8dp" />

    </LinearLayout>

    <ImageView
            android:id="@+id/move_cursor"
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:layout_alignParentStart="true"
            android:layout_alignParentTop="true"
            android:background="@drawable/circle_cool_black"
            android:padding="4dp"
            android:scaleType="fitXY"
            android:src="@drawable/ic_move_cursor"
            android:visibility="gone"
            tool:visibility="visible"
            android:tint="@android:color/white"
            tool:ignore="UseAppTint" />

    <ImageView
            android:id="@+id/resizer"
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:layout_alignParentBottom="true"
            android:layout_alignParentEnd="true"
            android:background="@drawable/circle_cool_black"
            android:padding="5dp"
            android:scaleType="fitXY"
            android:src="@drawable/ic_resizer"
            android:tint="@android:color/white"
            android:visibility="gone"
            tool:visibility="visible"
            tool:ignore="UseAppTint" />

</RelativeLayout>