<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2013 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/filmstrip_bottom_panel"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom"
    android:paddingBottom="@dimen/filmstrip_bottom_control_spacing"
    android:orientation="horizontal"
    android:visibility="visible" >

    <!-- A filler view -->
    <View
        android:layout_width="0dp"
        android:layout_height="1dp"
        android:layout_weight="1"
        android:visibility="invisible" />

    <FrameLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">

        <LinearLayout
            android:id="@+id/bottom_control_panel"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal">

            <ImageButton
                android:id="@+id/filmstrip_bottom_control_share"
                style="@style/FilmstripBottomControlButton"
                android:src="@drawable/ic_share"
                android:visibility="invisible"
                android:contentDescription="@string/share_button_description" />

            <LinearLayout
                android:layout_width="@dimen/filmstrip_bottom_control_middle_two_buttons_layout_size"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:visibility="visible">

                <View
                    android:layout_width="0dp"
                    android:layout_height="1dp"
                    android:layout_weight="1"
                    android:visibility="invisible" />

                <com.android.camera.widget.ExternalViewerButton
                    android:id="@+id/filmstrip_bottom_control_view"
                    style="@style/FilmstripBottomControlButton"
                    android:layout_gravity="center"
                    android:src="@drawable/ic_view_photosphere"
                    android:visibility="gone"
                    android:contentDescription="@string/view_button_description" />

                <View
                    android:id="@+id/filmstrip_bottom_control_middle_filler"
                    android:layout_width="0dp"
                    android:layout_height="1dp"
                    android:layout_weight="1"
                    android:visibility="invisible" />

                <ImageButton
                    android:id="@+id/filmstrip_bottom_control_edit"
                    style="@style/FilmstripBottomControlButton"
                    android:src="@drawable/ic_menu_edit"
                    android:visibility="gone"
                    android:contentDescription="@string/edit_button_description" />

                <View
                    android:layout_width="0dp"
                    android:layout_height="1dp"
                    android:layout_weight="1"
                    android:visibility="invisible" />

            </LinearLayout>

            <ImageButton
                android:id="@+id/filmstrip_bottom_control_delete"
                style="@style/FilmstripBottomControlButton"
                android:src="@drawable/ic_menu_trash"
                android:visibility="invisible"
                android:contentDescription="@string/delete_button_description" />
        </LinearLayout>

        <!-- The progress error panel -->
        <LinearLayout
            android:id="@+id/bottom_progress_error_panel"
            android:layout_width="@dimen/filmstrip_bottom_control_layout_size"
            android:layout_height="@dimen/filmstrip_bottom_control_button_size"
            android:layout_gravity="bottom|center_horizontal"
            android:gravity="center"
            android:visibility="gone"
            android:orientation="horizontal">

            <ImageView
                android:src="@drawable/ic_error_normal"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:paddingRight="10dp"
                android:scaleType="centerInside"/>

            <TextView
                android:id="@+id/bottom_progress_error_text"
                style="@style/FilmstripBottomProgressText"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"/>

        </LinearLayout>

        <!-- The progress bar -->
        <LinearLayout
            android:id="@+id/bottom_progress_panel"
            android:layout_width="@dimen/filmstrip_bottom_control_layout_size"
            android:layout_height="@dimen/filmstrip_bottom_control_button_size"
            android:layout_gravity="bottom|center_horizontal"
            android:visibility="gone"
            android:orientation="vertical">

            <TextView
                android:id="@+id/bottom_session_progress_text"
                style="@style/FilmstripBottomProgressText"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"/>

            <ProgressBar
                android:id="@+id/bottom_session_progress_bar"
                style="@android:style/Widget.Holo.Light.ProgressBar.Horizontal"
                android:progressDrawable="@drawable/bottom_progress_bar"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_weight="1" />
        </LinearLayout>
    </FrameLayout>

    <!-- A filler view -->
    <View
        android:layout_width="0dp"
        android:layout_height="1dp"
        android:layout_weight="1"
        android:visibility="invisible" />

</LinearLayout>
