1<?xml version="1.0" encoding="utf-8"?> 2<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 xmlns:app="http://schemas.android.com/apk/res-auto" 4 xmlns:tools="http://schemas.android.com/tools" 5 android:id="@+id/linearLayout" 6 android:layout_width="match_parent" 7 android:layout_height="match_parent" 8 android:layout_marginLeft="4dp" 9 android:layout_marginRight="4dp" 10 android:background="@color/version_release" 11 tools:context="com.google.sample.oboe.manualtest.MainActivity"> 12 13 <TextView 14 android:id="@+id/versionText" 15 android:layout_width="0dp" 16 android:layout_height="wrap_content" 17 android:text="V?" 18 app:layout_constraintEnd_toEndOf="@+id/buttonGrid" 19 app:layout_constraintStart_toStartOf="@+id/buttonGrid" 20 /> 21 22 <GridLayout 23 android:id="@+id/buttonGrid" 24 android:layout_width="match_parent" 25 android:layout_height="wrap_content" 26 android:columnCount="2" 27 app:layout_constraintTop_toBottomOf="@+id/versionText"> 28 29 <Button 30 android:id="@+id/buttonTestOutput" 31 android:layout_gravity="fill" 32 android:layout_width="0dp" 33 android:layout_columnWeight="1" 34 android:layout_height="wrap_content" 35 android:onClick="onLaunchTestOutput" 36 android:text="Test Output" 37 /> 38 39 <Button 40 android:id="@+id/buttonTestInput" 41 android:layout_gravity="fill" 42 android:layout_width="0dp" 43 android:layout_columnWeight="1" 44 android:layout_height="wrap_content" 45 android:onClick="onLaunchTestInput" 46 android:text="Test Input" /> 47 48 <Button 49 android:id="@+id/buttonTapToTone" 50 android:layout_gravity="fill" 51 android:layout_width="0dp" 52 android:layout_columnWeight="1" 53 android:layout_height="wrap_content" 54 android:onClick="onLaunchTapToTone" 55 android:text="Tap to Tone Latency" 56 /> 57 58 <Button 59 android:id="@+id/button_rt_latency" 60 android:layout_gravity="fill" 61 android:layout_width="0dp" 62 android:layout_columnWeight="1" 63 android:layout_height="wrap_content" 64 android:onClick="onLaunchRoundTripLatency" 65 android:text="Round Trip Latency" /> 66 67 <Button 68 android:id="@+id/buttonEcho" 69 android:layout_gravity="fill" 70 android:layout_width="0dp" 71 android:layout_columnWeight="1" 72 android:layout_height="wrap_content" 73 android:onClick="onLaunchEcho" 74 android:text="Echo Input to Output" /> 75 76 <Button 77 android:id="@+id/buttonRecorder" 78 android:layout_gravity="fill" 79 android:layout_width="0dp" 80 android:layout_columnWeight="1" 81 android:layout_height="wrap_content" 82 android:onClick="onLaunchRecorder" 83 android:text="Record and Play" 84 /> 85 86 <Button 87 android:id="@+id/button_manual_glitches" 88 android:layout_gravity="fill" 89 android:layout_width="0dp" 90 android:layout_columnWeight="1" 91 android:layout_height="wrap_content" 92 android:onClick="onLaunchManualGlitchTest" 93 android:text="Glitch Test" /> 94 95 <Button 96 android:id="@+id/button_auto_glitches" 97 android:layout_gravity="fill" 98 android:layout_width="0dp" 99 android:layout_columnWeight="1" 100 android:layout_height="wrap_content" 101 android:onClick="onLaunchAutoGlitchTest" 102 android:text="Auto Glitch Test" /> 103 104 <Button 105 android:id="@+id/button_test_disconnect" 106 android:layout_gravity="fill" 107 android:layout_width="0dp" 108 android:layout_columnWeight="1" 109 android:layout_height="wrap_content" 110 android:onClick="onLaunchTestDisconnect" 111 android:text="Test Disconnect" /> 112 113 <Button 114 android:id="@+id/button_test_device_report" 115 android:layout_gravity="fill" 116 android:layout_width="0dp" 117 android:layout_columnWeight="1" 118 android:layout_height="wrap_content" 119 android:onClick="onLaunchTestDeviceReport" 120 android:text="@string/title_report_devices" /> 121 122 <Button 123 android:id="@+id/button_test_data_paths" 124 android:layout_gravity="fill" 125 android:layout_width="0dp" 126 android:layout_columnWeight="1" 127 android:layout_height="wrap_content" 128 android:onClick="onLaunchTestDataPaths" 129 android:text="Data Paths" /> 130 131 </GridLayout> 132 133 134 <CheckBox 135 android:id="@+id/useCallback" 136 android:layout_width="wrap_content" 137 android:layout_height="wrap_content" 138 android:checked="true" 139 android:onClick="onUseCallbackClicked" 140 android:text="Use Callback" 141 app:layout_constraintEnd_toStartOf="@+id/textView" 142 app:layout_constraintStart_toStartOf="parent" 143 app:layout_constraintTop_toBottomOf="@+id/buttonGrid" /> 144 145 <TextView 146 android:id="@+id/textView" 147 android:layout_width="wrap_content" 148 android:layout_height="wrap_content" 149 android:layout_marginStart="4dp" 150 android:text="Size:" 151 app:layout_constraintBaseline_toBaselineOf="@+id/useCallback" 152 app:layout_constraintEnd_toStartOf="@+id/callbackSize" 153 app:layout_constraintStart_toEndOf="@+id/useCallback" /> 154 155 <EditText 156 android:id="@+id/callbackSize" 157 android:layout_width="0dp" 158 android:layout_height="wrap_content" 159 android:ems="8" 160 android:inputType="number" 161 android:text="0" 162 app:layout_constraintBaseline_toBaselineOf="@+id/textView" 163 app:layout_constraintEnd_toEndOf="parent" 164 app:layout_constraintStart_toEndOf="@+id/textView" /> 165 166 167 <CheckBox 168 android:id="@+id/setSpeakerphoneOn" 169 android:layout_width="wrap_content" 170 android:layout_height="wrap_content" 171 android:layout_marginTop="6dp" 172 android:checked="false" 173 android:onClick="onSetSpeakerphoneOn" 174 android:text="setSpeakerphoneOn/Off()" 175 app:layout_constraintStart_toStartOf="@+id/useCallback" 176 app:layout_constraintTop_toBottomOf="@+id/useCallback" /> 177 178 <LinearLayout 179 android:id="@+id/layoutBluetoothSco" 180 android:layout_width="match_parent" 181 android:layout_height="wrap_content" 182 android:orientation="horizontal" 183 app:layout_constraintStart_toStartOf="@+id/setSpeakerphoneOn" 184 app:layout_constraintTop_toBottomOf="@+id/setSpeakerphoneOn" 185 > 186 <CheckBox 187 android:id="@+id/setBluetoothScoOn" 188 android:layout_width="wrap_content" 189 android:layout_height="wrap_content" 190 android:layout_marginTop="6dp" 191 android:checked="false" 192 android:onClick="onStartStopBluetoothSco" 193 android:text="start/stopBluetoothSco()" 194 /> 195 196 <TextView 197 android:id="@+id/textBluetoothScoStatus" 198 android:layout_width="wrap_content" 199 android:layout_height="wrap_content" 200 android:layout_gravity="center_vertical" 201 android:layout_marginStart="12sp" 202 android:text="\?" /> 203 </LinearLayout> 204 205 <CheckBox 206 android:id="@+id/boxEnableWorkarounds" 207 android:layout_width="wrap_content" 208 android:layout_height="wrap_content" 209 android:layout_marginTop="6dp" 210 android:checked="false" 211 android:onClick="onEnableWorkarounds" 212 android:text="enable Oboe workarounds" 213 app:layout_constraintStart_toStartOf="@+id/layoutBluetoothSco" 214 app:layout_constraintTop_toBottomOf="@+id/layoutBluetoothSco" /> 215 216 217 <TextView 218 android:id="@+id/textView2" 219 android:layout_width="wrap_content" 220 android:layout_height="wrap_content" 221 android:text="Mode:" 222 app:layout_constraintBaseline_toBaselineOf="@+id/spinnerAudioMode" 223 app:layout_constraintStart_toStartOf="@+id/boxEnableWorkarounds" /> 224 225 <Spinner 226 android:id="@+id/spinnerAudioMode" 227 android:layout_width="wrap_content" 228 android:layout_height="wrap_content" 229 android:entries="@array/audio_modes" 230 android:prompt="@string/audio_mode_prompt" 231 app:layout_constraintStart_toEndOf="@+id/textView2" 232 app:layout_constraintTop_toBottomOf="@+id/boxEnableWorkarounds" /> 233 234 <TextView 235 android:id="@+id/deviceView" 236 android:layout_width="wrap_content" 237 android:layout_height="wrap_content" 238 android:lines="1" 239 android:text="@string/init_device" 240 app:layout_constraintStart_toStartOf="@+id/textView2" 241 app:layout_constraintTop_toBottomOf="@+id/spinnerAudioMode" /> 242 243 <TextView 244 android:id="@+id/text_build_info" 245 android:layout_width="0dp" 246 android:layout_height="wrap_content" 247 android:layout_marginEnd="1dp" 248 android:ems="10" 249 android:text="V?" 250 app:layout_constraintEnd_toEndOf="@+id/callbackSize" 251 app:layout_constraintStart_toStartOf="@+id/deviceView" 252 app:layout_constraintTop_toBottomOf="@+id/deviceView" /> 253 254</android.support.constraint.ConstraintLayout> 255