Xml文件  |  434行  |  17.9 KB

<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2012 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"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="horizontal" >

    <LinearLayout
        android:id="@+id/preview_column"
        android:layout_width="0dp"
        android:layout_height="fill_parent"
        android:layout_weight="6"
        android:animateLayoutChanges="false"
        android:orientation="vertical"
        android:visibility="visible" >

        <SurfaceView
            android:id="@+id/preview"
            android:layout_width="fill_parent"
            android:layout_height="0dp"
            android:layout_weight="@integer/preview_only_weight"
            tools:ignore="NestedWeights" />

        <SurfaceView
            android:id="@+id/callback_view"
            android:layout_width="fill_parent"
            android:layout_height="0dp"
            android:layout_weight="@integer/preview_with_callback_weight"
            android:visibility="gone" />

        <TextView
            android:id="@+id/log"
            android:layout_width="fill_parent"
            android:layout_height="10dp"
            android:layout_weight="1"
            android:freezesText="true"
            android:minLines="3"
            android:typeface="normal" />

    </LinearLayout>

    <ScrollView
        android:id="@+id/control_bar"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="2"
        android:fadingEdgeLength="100dp"
        android:requiresFadingEdge="vertical"
        android:scrollbarAlwaysDrawVerticalTrack="true" >

        <LinearLayout
            android:id="@+id/control_bar_contents"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="5dp"
            android:orientation="vertical" >

            <TextView
                android:id="@+id/camera_spinner_label"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dp"
                android:layout_weight="1"
                android:text="@string/camera_selection_prompt"
                android:textAppearance="?android:attr/textAppearanceSmall" />

            <Spinner
                android:id="@+id/camera_spinner"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:prompt="@string/camera_selection_prompt" />

            <CheckBox
                android:id="@+id/keep_open_checkbox"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/keep_open_prompt" />

            <Button
                android:id="@+id/info_button"
                style="?android:attr/buttonStyleSmall"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_weight="1"
                android:text="@string/show_info" />

            <View
                android:id="@+id/horizontal_rule_1"
                android:layout_width="fill_parent"
                android:layout_height="1dip"
                android:layout_marginBottom="@dimen/horiz_rule_btm_margin"
                android:layout_marginTop="@dimen/horiz_rule_top_margin"
                android:background="@color/horiz_rule_color" />

            <TextView
                android:id="@+id/preview_size_spinner_label"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/preview_resolution_prompt"
                android:textAppearance="?android:attr/textAppearanceSmall" />

            <Spinner
                android:id="@+id/preview_size_spinner"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:prompt="@string/preview_resolution_prompt" />

            <TextView
                android:id="@+id/preview_frame_rate_label"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/preview_frame_rate_prompt"
                android:textAppearance="?android:attr/textAppearanceSmall" />

            <Spinner
                android:id="@+id/preview_frame_rate_spinner"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1" />

            <ToggleButton
                android:id="@+id/hdr_mode"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_weight="1"
                android:textColorLink="@android:color/holo_blue_light"
                android:textOff="@string/hdr_off_label"
                android:textOn="@string/hdr_on_label" />

            <ToggleButton
                android:id="@+id/start_preview"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_weight="1"
                android:textColorLink="@android:color/holo_blue_light"
                android:textOff="@string/preview_off_label"
                android:textOn="@string/preview_on_label" />

            <View
                android:id="@+id/horizontal_rule_2"
                android:layout_width="fill_parent"
                android:layout_height="1dip"
                android:layout_marginBottom="@dimen/horiz_rule_btm_margin"
                android:layout_marginTop="@dimen/horiz_rule_top_margin"
                android:layout_weight="1"
                android:background="@color/horiz_rule_color" />

            <TextView
                android:id="@+id/af_mode_spinner_label"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/af_mode_prompt"
                android:textAppearance="?android:attr/textAppearanceSmall" />

            <Spinner
                android:id="@+id/af_mode_spinner"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1" />

            <Button
                android:id="@+id/af_button"
                style="?android:attr/buttonStyleSmall"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_weight="1"
                android:text="@string/trigger_autofocus" />

            <Button
                android:id="@+id/af_cancel_button"
                style="?android:attr/buttonStyleSmall"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_weight="1"
                android:text="@string/cancel_autofocus" />

            <TextView
                android:id="@+id/flash_mode_spinner_label"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/flash_mode_label"
                android:textAppearance="?android:attr/textAppearanceSmall" />

            <Spinner
                android:id="@+id/flash_mode_spinner"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1" />

            <TextView
                android:id="@+id/exposure_label"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/exposure_label"
                android:textAppearance="?android:attr/textAppearanceSmall" />

            <ToggleButton
                android:id="@+id/exposure_lock"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:textColorLink="@android:color/holo_blue_light"
                android:textOff="@string/exposure_lock_off_label"
                android:textOn="@string/exposure_lock_on_label" />

            <TextView
                android:id="@+id/zoom_label"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/zoom_label"
                android:textAppearance="?android:attr/textAppearanceSmall" />

            <SeekBar
                android:id="@+id/zoom_seekbar"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:progress="0"
                style="?android:attr/progressBarStyleHorizontal" />

            <View
                android:id="@+id/horizontal_rule_3"
                android:layout_width="fill_parent"
                android:layout_height="1dip"
                android:layout_marginBottom="@dimen/horiz_rule_btm_margin"
                android:layout_marginTop="@dimen/horiz_rule_top_margin"
                android:layout_weight="1"
                android:background="@color/horiz_rule_color" />

            <TextView
                android:id="@+id/snapshot_size_spinner_label"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/snapshot_size_prompt"
                android:textAppearance="?android:attr/textAppearanceSmall" />

            <Spinner
                android:id="@+id/snapshot_size_spinner"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1" />

            <Button
                android:id="@+id/take_picture"
                style="?android:attr/buttonStyleSmall"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/take_picture_label" />

            <View
                android:id="@+id/horizontal_rule_4"
                android:layout_width="fill_parent"
                android:layout_height="1dip"
                android:layout_marginBottom="@dimen/horiz_rule_btm_margin"
                android:layout_marginTop="@dimen/horiz_rule_top_margin"
                android:layout_weight="1"
                android:background="@color/horiz_rule_color" />

            <TextView
                android:id="@+id/camcorder_profile_spinner_label"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/camcorder_profile_prompt"
                android:textAppearance="?android:attr/textAppearanceSmall" />

            <Spinner
                android:id="@+id/camcorder_profile_spinner"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1" />

            <TextView
                android:id="@+id/video_record_size_spinner_label"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/video_record_size_prompt"
                android:textAppearance="?android:attr/textAppearanceSmall" />

            <Spinner
                android:id="@+id/video_record_size_spinner"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1" />

            <TextView
                android:id="@+id/video_frame_rate_label"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/video_frame_rate_prompt"
                android:textAppearance="?android:attr/textAppearanceSmall" />

            <Spinner
                android:id="@+id/video_frame_rate_spinner"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1" />

            <ToggleButton
                android:id="@+id/start_record"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:textColorLink="@android:color/holo_red_dark"
                android:textOff="@string/record_off_label"
                android:textOn="@string/record_on_label" />

            <CheckBox
                android:id="@+id/record_handoff_checkbox"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/record_handoff_prompt" />

            <ToggleButton
                android:id="@+id/record_stabilization"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:textColorLink="@android:color/holo_blue_dark"
                android:textOff="@string/record_stabilization_off_label"
                android:textOn="@string/record_stabilization_on_label" />

            <ToggleButton
                android:id="@+id/record_hint"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:textColorLink="@android:color/holo_blue_dark"
                android:textOff="@string/record_hint_off_label"
                android:textOn="@string/record_hint_on_label" />

            <ToggleButton
                android:id="@+id/lock_camera"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:textColorLink="@android:color/holo_blue_dark"
                android:textOff="@string/lock_camera_off_label"
                android:textOn="@string/lock_camera_on_label" />

            <View
                android:id="@+id/horizontal_rule_5"
                android:layout_width="fill_parent"
                android:layout_height="1dip"
                android:layout_marginBottom="@dimen/horiz_rule_btm_margin"
                android:layout_marginTop="@dimen/horiz_rule_top_margin"
                android:layout_weight="1"
                android:background="@color/horiz_rule_color" />

            <TextView
                android:id="@+id/callback_format_spinner_label"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/callback_format_prompt"
                android:textAppearance="?android:attr/textAppearanceSmall" />

            <Spinner
                android:id="@+id/callback_format_spinner"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1" />

            <ToggleButton
                android:id="@+id/enable_callbacks"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:textOff="@string/callbacks_off_label"
                android:textOn="@string/callbacks_on_label" />

            <View
                android:id="@+id/horizontal_rule_6"
                android:layout_width="fill_parent"
                android:layout_height="1dip"
                android:layout_marginBottom="@dimen/horiz_rule_btm_margin"
                android:layout_marginTop="@dimen/horiz_rule_top_margin"
                android:layout_weight="1"
                android:background="@color/horiz_rule_color" />

            <TextView
                android:id="@+id/color_effect_spinner_label"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/color_effect_prompt"
                android:textAppearance="?android:attr/textAppearanceSmall" />

            <Spinner
                android:id="@+id/color_effect_spinner"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1" />


        </LinearLayout>
    </ScrollView>

</LinearLayout>