<?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:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/Widget.AppCompat.SearchView"
        app:elevation="@dimen/dimen0dp">

        <com.google.android.material.appbar.MaterialToolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="?attr/primaryBackgroundColor">

            <ImageView
                android:id="@+id/close"
                android:layout_width="@dimen/dimen26dp"
                android:layout_height="@dimen/dimen26dp"
                android:layout_marginStart="@dimen/dimen16dp"
                android:layout_marginEnd="@dimen/dimen16dp"
                android:background="?android:attr/selectableItemBackgroundBorderless"
                android:clickable="true"
                android:contentDescription="@string/close"
                android:focusable="true"
                android:gravity="center_vertical"
                android:src="@drawable/ic_close"/>

            <TextView
                android:id="@+id/toolbar_title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:maxLines="1"
                android:text="@string/codeEditor"
                android:textColor="?attr/primaryTextColor"
                android:textSize="@dimen/dimen20sp"/>

        </com.google.android.material.appbar.MaterialToolbar>

    </com.google.android.material.appbar.AppBarLayout>

    <com.amrdeveloper.codeview.CodeView
        android:id="@+id/codeView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_above="@+id/source_info_layout"
        android:layout_marginTop="@dimen/dimen56dp"
        android:background="@color/colorPrimary"
        android:dropDownWidth="@dimen/dimen150dp"
        android:dropDownHorizontalOffset="@dimen/dimen0dp"
        android:dropDownSelector="@color/colorPrimary"
        android:gravity="top|start"
        android:textSize="@dimen/dimen14sp"/>

    <RelativeLayout
        android:id="@+id/source_info_layout"
        android:layout_width="match_parent"
        android:layout_height="@dimen/dimen32dp"
        android:layout_alignParentBottom="true"
        android:background="@color/black">

        <TextView
            android:id="@+id/language_name"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_alignParentStart="true"
            android:layout_marginStart="@dimen/dimen8dp"
            android:gravity="center"
            android:textColor="@color/colorAccent"
            android:textSize="@dimen/dimen14sp"
            tools:text="Java"/>

        <TextView
            android:id="@+id/source_position"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_alignParentEnd="true"
            android:layout_marginEnd="@dimen/dimen8dp"
            android:gravity="center"
            android:textColor="@color/colorAccent"
            android:textSize="@dimen/dimen14sp"
            tools:ignore="RelativeOverlap"
            tools:text="0:0"/>
    </RelativeLayout>

</RelativeLayout>
