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    android:orientation="vertical">
21    <FrameLayout
22        android:id="@+id/container"
23        android:layout_width="match_parent"
24        android:layout_height="0dp"
25        android:layout_weight="1">
26        <androidx.camera.view.PreviewView
27            android:id="@+id/preview_view"
28            android:layout_width="match_parent"
29            android:layout_height="match_parent" />
30    </FrameLayout>
31
32    <LinearLayout
33        android:layout_width="match_parent"
34        android:layout_height="wrap_content">
35        <Button
36            android:id="@+id/remove_or_add"
37            android:layout_width="wrap_content"
38            android:layout_height="wrap_content"
39            android:text="@string/btn_remove_or_add" />
40        <Button
41            android:id="@+id/shrink"
42            android:layout_width="wrap_content"
43            android:layout_height="wrap_content"
44            android:text="@string/btn_shrink" />
45        <ToggleButton
46            android:id="@+id/camera_toggle"
47            android:layout_width="wrap_content"
48            android:layout_height="wrap_content"
49            android:textOff="@string/toggle_camera_front"
50            android:textOn="@string/toggle_camera_back" />
51    </LinearLayout>
52
53    <LinearLayout
54        android:layout_width="match_parent"
55        android:layout_height="wrap_content">
56        <ToggleButton
57            android:id="@+id/capture_enabled"
58            android:layout_width="wrap_content"
59            android:layout_height="wrap_content"
60            android:textOff="@string/toggle_capture_disabled"
61            android:textOn="@string/toggle_capture_enabled" />
62        <Button
63            android:id="@+id/flash_mode"
64            android:layout_width="wrap_content"
65            android:layout_height="wrap_content" />
66        <Button
67            android:id="@+id/capture"
68            android:layout_width="wrap_content"
69            android:layout_height="wrap_content"
70            android:text="@string/btn_capture" />
71        <CheckBox
72            android:id="@+id/on_disk"
73            android:layout_width="wrap_content"
74            android:layout_height="wrap_content"
75            android:checked="true"
76            android:text="@string/on_disk"/>
77    </LinearLayout>
78
79    <LinearLayout
80        android:layout_width="match_parent"
81        android:layout_height="wrap_content">
82        <ToggleButton
83            android:id="@+id/analysis_enabled"
84            android:layout_width="wrap_content"
85            android:layout_height="wrap_content"
86            android:textOff="@string/toggle_analysis_disabled"
87            android:textOn="@string/toggle_analysis_enabled" />
88        <ToggleButton
89            android:id="@+id/analyzer_set"
90            android:layout_width="wrap_content"
91            android:layout_height="wrap_content"
92            android:textOff="@string/toggle_analyzer_not_set"
93            android:textOn="@string/toggle_analyzer_set" />
94        <TextView
95            android:id="@+id/luminance"
96            android:layout_width="wrap_content"
97            android:layout_height="wrap_content"/>
98    </LinearLayout>
99
100    <LinearLayout
101        android:layout_width="match_parent"
102        android:layout_height="wrap_content">
103        <ToggleButton
104            android:id="@+id/video_enabled"
105            android:layout_width="wrap_content"
106            android:layout_height="wrap_content"
107            android:textOff="@string/toggle_video_disabled"
108            android:textOn="@string/toggle_video_enabled" />
109        <Button
110            android:id="@+id/video_record"
111            android:layout_width="wrap_content"
112            android:layout_height="wrap_content"
113            android:text="@string/btn_video_record" />
114        <Button
115            android:id="@+id/video_stop_recording"
116            android:layout_width="wrap_content"
117            android:layout_height="wrap_content"
118            android:text="@string/btn_video_stop_recording"/>
119    </LinearLayout>
120
121    <LinearLayout
122        android:layout_width="match_parent"
123        android:layout_height="40dp"
124        android:gravity="center_vertical">
125        <TextView
126            android:layout_width="wrap_content"
127            android:layout_height="wrap_content"
128            android:text="@string/linear_zoom"/>
129        <SeekBar
130            android:id="@+id/linear_zoom_slider"
131            android:layout_width="match_parent"
132            android:layout_height="wrap_content"
133            android:max="100"/>
134    </LinearLayout>
135    <LinearLayout
136        android:layout_width="match_parent"
137        android:layout_height="wrap_content">
138        <ToggleButton
139            android:id="@+id/pinch_to_zoom_toggle"
140            android:layout_width="wrap_content"
141            android:layout_height="wrap_content"
142            android:textOff="@string/pinch_to_zoom"
143            android:textOn="@string/pinch_to_zoom"/>
144        <ToggleButton
145            android:id="@+id/tap_to_focus_toggle"
146            android:layout_width="wrap_content"
147            android:layout_height="wrap_content"
148            android:textOff="@string/tap_to_focus"
149            android:textOn="@string/tap_to_focus"/>
150        <ToggleButton
151            android:id="@+id/torch_toggle"
152            android:layout_width="wrap_content"
153            android:layout_height="wrap_content"
154            android:textOff="@string/torch"
155            android:textOn="@string/torch"/>
156    </LinearLayout>
157    <TextView
158        android:id="@+id/zoom_state_text"
159        android:layout_width="wrap_content"
160        android:layout_height="wrap_content"
161        android:lines="2"/>
162    <TextView
163        android:id="@+id/focus_result_text"
164        android:layout_width="wrap_content"
165        android:layout_height="wrap_content"/>
166    <TextView
167        android:id="@+id/torch_state_text"
168        android:layout_width="wrap_content"
169        android:layout_height="wrap_content"/>
170    <ImageView
171        android:id="@+id/focus_on_tap_circle"
172        android:layout_width="wrap_content"
173        android:layout_height="wrap_content"
174        android:src="@drawable/outline_circle_24" />
175</LinearLayout>
176