<?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:background="@android:color/darker_gray"
    tools:ignore="Overdraw">

    <LinearLayout
        android:id="@+id/titleLayout"
        android:layout_width="match_parent"
        android:layout_height="52dp"
        android:background="@color/colorPrimary"
        android:orientation="horizontal">

        <TextView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="center"
            android:text="@string/perfiles_pacientes"
            android:textColor="#FFFFFF"
            android:textSize="20sp"
            android:textStyle="bold" />

    </LinearLayout>

    <!-- Toolbar -->
    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />

    <LinearLayout
        android:id="@+id/barraBusqueda"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/titleLayout"
        android:layout_marginTop="10dp"
        android:baselineAligned="false"
        android:orientation="horizontal">

        <EditText
            android:id="@+id/patientSearch"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginLeft="5dp"
            android:layout_marginStart="5dp"
            android:layout_weight="1.5"
            android:background="@drawable/spinnerframetext"
            android:hint="@string/patientSearch"
            android:padding="10dp"
            android:textColor="#000000"
            android:textColorHint="@android:color/darker_gray"
            android:textSize="20sp" />

        <RelativeLayout
            android:id="@+id/spinner_dropdown"
            android:layout_width="70dp"
            android:layout_height="match_parent"
            android:layout_marginEnd="3dp"
            android:layout_marginLeft="3dp"
            android:layout_marginRight="5dp"
            android:layout_marginStart="5dp"
            android:layout_weight="0.5"
            android:background="@drawable/spinner_background"
            android:orientation="horizontal">

            <Spinner
                android:id="@+id/spinner"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_centerVertical="true"
                android:layout_marginLeft="5dp"
                android:layout_marginStart="5dp"
                android:background="@android:color/transparent"
                android:gravity="center"
                android:spinnerMode="dialog" />

            <ImageView
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_alignParentEnd="true"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:layout_gravity="center"
                android:contentDescription="@string/dropdown_icon_description"
                android:paddingEnd="10dp"
                android:paddingLeft="0dp"
                android:paddingRight="10dp"
                android:paddingStart="0dp"
                android:src="@mipmap/dropdown_icon" />

        </RelativeLayout>

    </LinearLayout>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@+id/barraBusqueda"
        android:layout_marginTop="10dp">

        <android.support.v7.widget.RecyclerView
            android:id="@+id/recyler_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:scrollbars="vertical" />

        <android.support.design.widget.FloatingActionButton
            android:id="@+id/añadir_paciente"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_alignParentEnd="true"
            android:layout_alignParentRight="true"
            android:layout_margin="16dp"
            app:backgroundTint="@android:color/white"
            app:fabSize="normal"
            app:srcCompat="@drawable/account_plus" />
    </RelativeLayout>

</RelativeLayout>