| <?xml version="1.0" encoding="utf-8"?><!-- |
| Copyright 2020 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:app="http://schemas.android.com/apk/res-auto" |
| android:layout_width="match_parent" |
| android:layout_height="match_parent" |
| android:orientation="vertical"> |
| <FrameLayout |
| android:id="@+id/container" |
| android:layout_width="match_parent" |
| android:layout_height="0dp" |
| android:layout_weight="1"> |
| <androidx.camera.view.PreviewView |
| android:id="@+id/preview_view" |
| android:layout_width="match_parent" |
| android:layout_height="match_parent" /> |
| </FrameLayout> |
| |
| <LinearLayout |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content"> |
| <Button |
| android:id="@+id/remove_or_add" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:text="@string/btn_remove_or_add" /> |
| <Button |
| android:id="@+id/shrink" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:text="@string/btn_shrink" /> |
| <ToggleButton |
| android:id="@+id/camera_toggle" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:textOff="@string/toggle_camera_front" |
| android:textOn="@string/toggle_camera_back" /> |
| <ToggleButton |
| android:id="@+id/effect_toggle" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:textOff="@string/toggle_effect_off" |
| android:textOn="@string/toggle_effect_on" /> |
| </LinearLayout> |
| |
| <LinearLayout |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content"> |
| <ToggleButton |
| android:id="@+id/capture_enabled" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:textOff="@string/toggle_capture_disabled" |
| android:textOn="@string/toggle_capture_enabled" /> |
| <Button |
| android:id="@+id/flash_mode" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" /> |
| <Button |
| android:id="@+id/capture" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:text="@string/btn_capture" /> |
| <CheckBox |
| android:id="@+id/on_disk" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:checked="true" |
| android:text="@string/on_disk"/> |
| </LinearLayout> |
| |
| <LinearLayout |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content"> |
| <ToggleButton |
| android:id="@+id/analysis_enabled" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:textOff="@string/toggle_analysis_disabled" |
| android:textOn="@string/toggle_analysis_enabled" /> |
| <ToggleButton |
| android:id="@+id/analyzer_set" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:textOff="@string/toggle_analyzer_not_set" |
| android:textOn="@string/toggle_analyzer_set" /> |
| <TextView |
| android:id="@+id/luminance" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content"/> |
| </LinearLayout> |
| |
| <LinearLayout |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content"> |
| <ToggleButton |
| android:id="@+id/video_enabled" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:textOff="@string/toggle_video_disabled" |
| android:textOn="@string/toggle_video_enabled" /> |
| <Button |
| android:id="@+id/video_record" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:text="@string/btn_video_record" /> |
| <Button |
| android:id="@+id/video_stop_recording" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:text="@string/btn_video_stop_recording"/> |
| </LinearLayout> |
| |
| <LinearLayout |
| android:layout_width="match_parent" |
| android:layout_height="40dp" |
| android:gravity="center_vertical"> |
| <TextView |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:text="@string/linear_zoom"/> |
| <SeekBar |
| android:id="@+id/linear_zoom_slider" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:max="100"/> |
| </LinearLayout> |
| <LinearLayout |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content"> |
| <ToggleButton |
| android:id="@+id/pinch_to_zoom_toggle" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:textOff="@string/pinch_to_zoom" |
| android:textOn="@string/pinch_to_zoom"/> |
| <ToggleButton |
| android:id="@+id/tap_to_focus_toggle" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:textOff="@string/tap_to_focus" |
| android:textOn="@string/tap_to_focus"/> |
| <ToggleButton |
| android:id="@+id/torch_toggle" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:textOff="@string/torch" |
| android:textOn="@string/torch"/> |
| </LinearLayout> |
| <TextView |
| android:id="@+id/zoom_state_text" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:lines="2"/> |
| <TextView |
| android:id="@+id/focus_result_text" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content"/> |
| <TextView |
| android:id="@+id/torch_state_text" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content"/> |
| </LinearLayout> |