<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:orientation="vertical"
    tools:context="es.ua.eps.filmoteca.FilmEditActivity">

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

        <ImageView
            android:layout_width="40dp"
            android:layout_height="50dp"
            android:id="@+id/imgEditPoster"
            android:src="@mipmap/ic_launcher" />

        <Button
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:text="@string/film_edit_capture_photo_button"
            android:id="@+id/btnEditCapturePhoto"
            android:layout_weight="1" />

        <Button
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:text="@string/film_edit_select_image_button"
            android:id="@+id/btnEditSelectPhoto"
            android:layout_weight="1" />

    </LinearLayout>


    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="textPersonName"
        android:ems="10"
        android:id="@+id/etEditTitle"
        android:hint="@string/film_edit_title_hint" />

    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="textPersonName"
        android:ems="10"
        android:id="@+id/etEditDirector"
        android:hint="@string/film_edit_director_hint" />

    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="number"
        android:ems="10"
        android:id="@+id/etEditYear"
        android:hint="@string/film_edit_year_hint" />

    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/etEditImdb"
        android:inputType="textUri"
        android:hint="@string/film_edit_imdb_hint" />

    <Spinner
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/spinnerEditGenre"
        android:entries="@array/genres"
        android:prompt="@string/film_edit_prompt_genre"
        android:spinnerMode="dialog" />

    <Spinner
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/spinnerEditFormat"
        android:entries="@array/formats"
        android:prompt="@string/film_edit_prompt_format"
        android:spinnerMode="dialog" />

    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="textMultiLine"
        android:ems="10"
        android:id="@+id/etEditComments"
        android:hint="@string/film_edit_comment_hint" />

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

        <Button
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:text="@string/film_edit_cancel_button"
            android:id="@+id/btnEditCancel"
            android:layout_below="@+id/btnEditSave"
            android:layout_centerHorizontal="true"
            android:layout_weight="1" />

        <Button
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:text="@string/film_edit_save_button"
            android:id="@+id/btnEditSave"
            android:layout_below="@+id/txtEditTitle"
            android:layout_centerHorizontal="true"
            android:layout_weight="1" />

    </LinearLayout>

</LinearLayout>
