<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:background="@color/gallery_background">

    <LinearLayout android:layout_width="match_parent" android:layout_height="64dp" android:gravity="center_vertical" android:paddingStart="8dp" android:paddingEnd="12dp">
        <ImageButton android:id="@+id/video_close" android:layout_width="48dp" android:layout_height="48dp" android:background="@drawable/bg_header_action" android:padding="13dp" android:src="@drawable/ic_back" android:contentDescription="@string/close"/>
        <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:orientation="vertical" android:paddingStart="12dp">
            <TextView style="@style/LemenzoUI.Text.TitleLarge" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/video_editor_title"/>
            <TextView style="@style/LemenzoUI.Text.BodySmall" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/video_editor_hint" android:textColor="@color/gallery_muted" android:maxLines="1" android:ellipsize="end"/>
        </LinearLayout>
    </LinearLayout>

    <FrameLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:layout_marginStart="10dp" android:layout_marginEnd="10dp" android:layout_marginBottom="8dp" android:background="@drawable/bg_editor_preview" android:padding="4dp">
        <VideoView android:id="@+id/video_editor_preview" android:layout_width="match_parent" android:layout_height="match_parent" android:contentDescription="@string/video_preview"/>
        <Button android:id="@+id/video_play_pause" style="@style/GalleryEditorChip" android:layout_width="wrap_content" android:layout_height="48dp" android:layout_gravity="bottom|center_horizontal" android:layout_marginBottom="12dp" android:text="@string/pause" android:contentDescription="@string/video_play_pause"/>
    </FrameLayout>

    <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:background="@drawable/bg_editor_sheet" android:padding="12dp">
        <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_vertical">
            <TextView style="@style/GalleryEditorSectionLabel" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="@string/video_trim"/>
            <TextView android:id="@+id/video_range" style="@style/LemenzoUI.Text.Body" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/bg_editor_chip" android:paddingStart="12dp" android:paddingEnd="12dp" android:paddingTop="7dp" android:paddingBottom="7dp" android:textColor="@color/gallery_text"/>
        </LinearLayout>

        <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:layout_marginTop="8dp" android:background="@drawable/bg_editor_panel" android:padding="12dp">
            <TextView style="@style/LemenzoUI.Text.BodySmall" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/trim_start" android:textColor="@color/gallery_text_secondary"/>
            <SeekBar android:id="@+id/video_start_seek" android:layout_width="match_parent" android:layout_height="wrap_content" android:max="1000" android:contentDescription="@string/trim_start"/>
            <TextView style="@style/LemenzoUI.Text.BodySmall" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/trim_end" android:textColor="@color/gallery_text_secondary"/>
            <SeekBar android:id="@+id/video_end_seek" android:layout_width="match_parent" android:layout_height="wrap_content" android:max="1000" android:contentDescription="@string/trim_end"/>
        </LinearLayout>

        <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_vertical" android:layout_marginTop="8dp">
            <TextView style="@style/GalleryEditorSectionLabel" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="@string/video_transform"/>
            <Switch android:id="@+id/video_mute" android:layout_width="wrap_content" android:layout_height="48dp" android:text="@string/mute_audio" android:textColor="@color/gallery_text_secondary"/>
        </LinearLayout>

        <HorizontalScrollView android:layout_width="match_parent" android:layout_height="wrap_content" android:scrollbars="none">
            <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal">
                <Button android:id="@+id/video_rotate_left" style="@style/GalleryEditorChip" android:layout_width="wrap_content" android:layout_height="48dp" android:text="@string/rotate_video_left"/>
                <Button android:id="@+id/video_rotate_right" style="@style/GalleryEditorChip" android:layout_width="wrap_content" android:layout_height="48dp" android:layout_marginStart="8dp" android:text="@string/rotate_video_right"/>
                <Button android:id="@+id/video_save_frame" style="@style/GalleryEditorChip" android:layout_width="wrap_content" android:layout_height="48dp" android:layout_marginStart="8dp" android:text="@string/save_current_frame"/>
            </LinearLayout>
        </HorizontalScrollView>
        <TextView android:id="@+id/video_rotation_status" style="@style/LemenzoUI.Text.BodySmall" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:layout_marginTop="6dp" android:textColor="@color/gallery_text_secondary"/>
        <TextView style="@style/LemenzoUI.Text.BodySmall" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:text="@string/video_trim_note" android:textColor="@color/gallery_muted"/>
        <Button android:id="@+id/video_save" style="@style/LemenzoUI.Button.Primary" android:layout_width="match_parent" android:layout_height="54dp" android:layout_marginTop="10dp" android:text="@string/save_video_copy"/>
    </LinearLayout>
</LinearLayout>
