1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 Copyright 2019 The Android Open Source Project 4 5 Licensed under the Apache License, Version 2.0 (the "License"); 6 you may not use this file except in compliance with the License. 7 You may obtain a copy of the License at 8 9 http://www.apache.org/licenses/LICENSE-2.0 10 11 Unless required by applicable law or agreed to in writing, software 12 distributed under the License is distributed on an "AS IS" BASIS, 13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 See the License for the specific language governing permissions and 15 limitations under the License. 16 --> 17 18<androidx.constraintlayout.widget.ConstraintLayout 19 xmlns:android="http://schemas.android.com/apk/res/android" 20 xmlns:app="http://schemas.android.com/apk/res-auto" 21 xmlns:tools="http://schemas.android.com/tools" 22 android:id="@+id/constraintLayout" 23 android:layout_width="match_parent" 24 android:layout_height="match_parent" 25 tools:context="androidx.camera.integration.extensions.CameraExtensionsActivity"> 26 27 <ViewStub 28 android:id="@+id/viewFinderStub" 29 android:inflatedId="@id/viewFinder" 30 android:layout_width="0dp" 31 android:layout_height="0dp" 32 app:layout_constraintBottom_toBottomOf="parent" 33 app:layout_constraintEnd_toEndOf="parent" 34 app:layout_constraintStart_toStartOf="parent" 35 app:layout_constraintTop_toTopOf="parent" /> 36 37 <androidx.constraintlayout.widget.Guideline 38 android:id="@+id/guideline" 39 android:layout_width="wrap_content" 40 android:layout_height="wrap_content" 41 android:orientation="vertical" 42 app:layout_constraintGuide_begin="0dp" 43 app:layout_constraintGuide_percent="0.7"/> 44 45 <androidx.constraintlayout.widget.Guideline 46 android:id="@+id/takepicture" 47 android:layout_width="wrap_content" 48 android:layout_height="wrap_content" 49 android:orientation="vertical" 50 app:layout_constraintGuide_begin="0dp" 51 app:layout_constraintGuide_percent="0.1"/> 52 53 <Button 54 android:id="@+id/Picture" 55 android:layout_width="wrap_content" 56 android:layout_height="wrap_content" 57 android:scaleType="fitXY" 58 android:text="Take Picture" 59 app:layout_constraintBottom_toBottomOf="parent" 60 app:layout_constraintEnd_toEndOf="parent" 61 app:layout_constraintHorizontal_bias="0.415" 62 app:layout_constraintStart_toStartOf="@+id/takepicture" 63 app:layout_constraintTop_toTopOf="parent" 64 app:layout_constraintVertical_bias="1.0"/> 65 66 <Button 67 android:id="@+id/record" 68 android:layout_width="wrap_content" 69 android:layout_height="wrap_content" 70 android:scaleType="fitXY" 71 android:text="@string/button_record_start" 72 android:visibility="gone" 73 app:layout_constraintBottom_toTopOf="@+id/Picture" 74 app:layout_constraintEnd_toEndOf="@+id/Picture" 75 app:layout_constraintStart_toStartOf="@+id/Picture" /> 76 77 <Button 78 android:id="@+id/PhotoToggle" 79 android:layout_width="wrap_content" 80 android:layout_height="wrap_content" 81 android:scaleType="fitXY" 82 android:text="DEFAULT" 83 app:layout_constraintBottom_toBottomOf="parent" 84 app:layout_constraintEnd_toEndOf="parent" 85 app:layout_constraintStart_toStartOf="@+id/constraintLayout" 86 app:layout_constraintTop_toTopOf="parent" 87 app:layout_constraintVertical_bias="0.0"/> 88 89 <Button 90 android:id="@+id/Switch" 91 android:layout_width="wrap_content" 92 android:layout_height="wrap_content" 93 android:text="Switch" 94 app:layout_constraintEnd_toStartOf="@+id/Picture" 95 app:layout_constraintTop_toTopOf="@+id/Picture" /> 96 97 <ToggleButton 98 android:id="@+id/videoToggle" 99 android:layout_width="wrap_content" 100 android:layout_height="wrap_content" 101 android:checked="false" 102 android:textOff="@string/toggle_video_off" 103 android:textOn="@string/toggle_video_on" 104 android:visibility="gone" 105 app:layout_constraintEnd_toEndOf="parent" 106 app:layout_constraintTop_toBottomOf="@+id/PhotoToggle" /> 107 108 <Button 109 android:id="@+id/image_output_format" 110 android:layout_width="46dp" 111 android:layout_height="wrap_content" 112 android:layout_marginTop="1dp" 113 android:layout_marginRight="5dp" 114 android:background="@drawable/round_button" 115 android:scaleType="fitXY" 116 android:textColor="#EEEEEE" 117 android:textSize="14dp" 118 android:visibility="invisible" 119 app:layout_constraintTop_toBottomOf="@id/videoToggle" 120 app:layout_constraintRight_toRightOf="parent" 121 /> 122 123 <ImageButton 124 android:id="@+id/ExtensionToggle" 125 android:layout_width="wrap_content" 126 android:layout_height="wrap_content" 127 android:layout_marginLeft="5dp" 128 android:layout_marginTop="1dp" 129 android:background="@android:drawable/btn_default" 130 android:scaleType="fitCenter" 131 android:src="@drawable/outline_block" 132 android:translationZ="1dp" 133 android:visibility="gone" 134 app:layout_constraintRight_toRightOf="parent" 135 app:layout_constraintTop_toTopOf="parent" /> 136 137 <Switch 138 android:id="@+id/videoStabilizationToggle" 139 android:layout_width="wrap_content" 140 android:layout_height="wrap_content" 141 android:layout_margin="16dp" 142 android:visibility="gone" 143 app:layout_constraintLeft_toLeftOf="parent" 144 app:layout_constraintTop_toTopOf="parent" 145 /> 146 147 <TextView 148 android:id="@+id/videoStabilizationMode" 149 android:layout_width="wrap_content" 150 android:layout_height="wrap_content" 151 android:layout_margin="16dp" 152 android:text="Video Stabilization Mode: Off" 153 android:visibility="gone" 154 android:padding="8dp" 155 android:background="@drawable/bg_pill" 156 app:layout_constraintLeft_toLeftOf="parent" 157 app:layout_constraintTop_toBottomOf="@id/videoStabilizationToggle" 158 /> 159 160 <TextView 161 android:id="@+id/infoBlock" 162 android:layout_width="wrap_content" 163 android:layout_height="wrap_content" 164 android:shadowColor="#000000" 165 android:shadowDx="1" 166 android:shadowDy="1" 167 android:shadowRadius="2" 168 android:text="" 169 android:textColor="#FFFFFF" 170 app:layout_constraintBottom_toBottomOf="parent" 171 app:layout_constraintEnd_toEndOf="parent" /> 172</androidx.constraintlayout.widget.ConstraintLayout> 173