1<?xml version="1.0" encoding="utf-8"?><!-- 2 Copyright 2020 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 --> 16<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 17 xmlns:app="http://schemas.android.com/apk/res-auto" 18 android:layout_width="match_parent" 19 android:layout_height="match_parent"> 20 <FrameLayout 21 android:id="@+id/container" 22 android:layout_width="0dp" 23 android:layout_height="match_parent" 24 android:layout_weight="1"> 25 <androidx.camera.view.PreviewView 26 android:id="@+id/preview_view" 27 android:layout_width="match_parent" 28 android:layout_height="match_parent" /> 29 </FrameLayout> 30 31 <LinearLayout 32 android:layout_width="wrap_content" 33 android:layout_height="match_parent" 34 android:orientation="vertical"> 35 <LinearLayout 36 android:layout_width="wrap_content" 37 android:layout_height="wrap_content"> 38 <Button 39 android:id="@+id/remove_or_add" 40 android:layout_width="wrap_content" 41 android:layout_height="wrap_content" 42 android:text="@string/btn_remove_or_add" /> 43 <Button 44 android:id="@+id/shrink" 45 android:layout_width="wrap_content" 46 android:layout_height="wrap_content" 47 android:text="@string/btn_shrink" /> 48 <ToggleButton 49 android:id="@+id/camera_toggle" 50 android:layout_width="wrap_content" 51 android:layout_height="wrap_content" 52 android:textOff="@string/toggle_camera_front" 53 android:textOn="@string/toggle_camera_back" /> 54 </LinearLayout> 55 56 <LinearLayout 57 android:layout_width="wrap_content" 58 android:layout_height="wrap_content"> 59 <ToggleButton 60 android:id="@+id/capture_enabled" 61 android:layout_width="wrap_content" 62 android:layout_height="wrap_content" 63 android:textOff="@string/toggle_capture_disabled" 64 android:textOn="@string/toggle_capture_enabled" /> 65 <Button 66 android:id="@+id/flash_mode" 67 android:layout_width="wrap_content" 68 android:layout_height="wrap_content" /> 69 <Button 70 android:id="@+id/capture" 71 android:layout_width="wrap_content" 72 android:layout_height="wrap_content" 73 android:text="@string/btn_capture" /> 74 <CheckBox 75 android:id="@+id/on_disk" 76 android:layout_width="wrap_content" 77 android:layout_height="wrap_content" 78 android:checked="true" 79 android:text="@string/on_disk"/> 80 </LinearLayout> 81 <LinearLayout 82 android:layout_width="match_parent" 83 android:layout_height="wrap_content"> 84 <ToggleButton 85 android:id="@+id/analysis_enabled" 86 android:layout_width="wrap_content" 87 android:layout_height="wrap_content" 88 android:textOff="@string/toggle_analysis_disabled" 89 android:textOn="@string/toggle_analysis_enabled" /> 90 <ToggleButton 91 android:id="@+id/analyzer_set" 92 android:layout_width="wrap_content" 93 android:layout_height="wrap_content" 94 android:textOff="@string/toggle_analyzer_not_set" 95 android:textOn="@string/toggle_analyzer_set" /> 96 <TextView 97 android:id="@+id/luminance" 98 android:layout_width="wrap_content" 99 android:layout_height="wrap_content"/> 100 </LinearLayout> 101 102 <LinearLayout 103 android:layout_width="wrap_content" 104 android:layout_height="wrap_content"> 105 <ToggleButton 106 android:id="@+id/video_enabled" 107 android:layout_width="wrap_content" 108 android:layout_height="wrap_content" 109 android:textOff="@string/toggle_video_disabled" 110 android:textOn="@string/toggle_video_enabled" /> 111 <Button 112 android:id="@+id/video_record" 113 android:layout_width="wrap_content" 114 android:layout_height="wrap_content" 115 android:text="@string/btn_video_record" /> 116 <Button 117 android:id="@+id/video_stop_recording" 118 android:layout_width="wrap_content" 119 android:layout_height="wrap_content" 120 android:text="@string/btn_video_stop_recording"/> 121 </LinearLayout> 122 123 <LinearLayout 124 android:layout_width="wrap_content" 125 android:layout_height="40dp" 126 android:gravity="center_vertical"> 127 <TextView 128 android:layout_width="wrap_content" 129 android:layout_height="wrap_content" 130 android:text="@string/linear_zoom"/> 131 <SeekBar 132 android:id="@+id/linear_zoom_slider" 133 android:layout_width="match_parent" 134 android:layout_height="wrap_content" 135 android:max="100"/> 136 </LinearLayout> 137 <LinearLayout 138 android:layout_width="wrap_content" 139 android:layout_height="wrap_content"> 140 <ToggleButton 141 android:id="@+id/pinch_to_zoom_toggle" 142 android:layout_width="wrap_content" 143 android:layout_height="wrap_content" 144 android:textOff="@string/pinch_to_zoom" 145 android:textOn="@string/pinch_to_zoom"/> 146 <ToggleButton 147 android:id="@+id/tap_to_focus_toggle" 148 android:layout_width="wrap_content" 149 android:layout_height="wrap_content" 150 android:textOff="@string/tap_to_focus" 151 android:textOn="@string/tap_to_focus"/> 152 <ToggleButton 153 android:id="@+id/torch_toggle" 154 android:layout_width="wrap_content" 155 android:layout_height="wrap_content" 156 android:textOff="@string/torch" 157 android:textOn="@string/torch"/> 158 </LinearLayout> 159 <TextView 160 android:id="@+id/zoom_state_text" 161 android:layout_width="300dp" 162 android:layout_height="wrap_content" 163 android:lines="2"/> 164 <TextView 165 android:id="@+id/focus_result_text" 166 android:layout_width="wrap_content" 167 android:layout_height="wrap_content"/> 168 <TextView 169 android:id="@+id/torch_state_text" 170 android:layout_width="300dp" 171 android:layout_height="wrap_content"/> 172 </LinearLayout> 173</LinearLayout>