1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright (C) 2018 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<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
18    xmlns:app="http://schemas.android.com/apk/res-auto"
19    xmlns:tools="http://schemas.android.com/tools"
20    android:layout_width="match_parent"
21    android:layout_height="match_parent"
22    tools:context="com.google.oboe.samples.liveEffect.MainActivity"
23    tools:layout_editor_absoluteY="81dp">
24
25    <TextView
26        android:id="@+id/recDeviceLabel"
27        android:layout_width="wrap_content"
28        android:layout_height="wrap_content"
29        android:layout_marginStart="@dimen/activity_horizontal_margin"
30        android:layout_marginLeft="@dimen/activity_horizontal_margin"
31        android:layout_marginTop="@dimen/activity_vertical_margin"
32        android:text="@string/recording_device"
33        app:layout_constraintLeft_toLeftOf="parent"
34        app:layout_constraintTop_toTopOf="parent" />
35
36    <com.google.oboe.samples.audio_device.AudioDeviceSpinner
37        android:id="@+id/recording_devices_spinner"
38        android:layout_width="wrap_content"
39        android:layout_height="wrap_content"
40        android:layout_marginStart="@dimen/activity_horizontal_margin"
41        android:layout_marginLeft="@dimen/activity_horizontal_margin"
42        android:layout_marginTop="0dp"
43        app:layout_constraintLeft_toLeftOf="parent"
44        app:layout_constraintTop_toBottomOf="@+id/recDeviceLabel" />
45
46    <TextView
47        android:id="@+id/playDeviceLabel"
48        android:layout_width="wrap_content"
49        android:layout_height="wrap_content"
50        android:layout_marginStart="@dimen/activity_horizontal_margin"
51        android:layout_marginLeft="@dimen/activity_horizontal_margin"
52        android:layout_marginTop="@dimen/activity_vertical_margin"
53        android:text="@string/playback_device"
54        app:layout_constraintLeft_toLeftOf="parent"
55        app:layout_constraintTop_toBottomOf="@+id/recording_devices_spinner" />
56
57    <com.google.oboe.samples.audio_device.AudioDeviceSpinner
58        android:id="@+id/playback_devices_spinner"
59        android:layout_width="wrap_content"
60        android:layout_height="wrap_content"
61        android:layout_marginStart="@dimen/activity_horizontal_margin"
62        android:layout_marginLeft="@dimen/activity_horizontal_margin"
63        android:layout_marginTop="0dp"
64        app:layout_constraintLeft_toLeftOf="parent"
65        app:layout_constraintTop_toBottomOf="@+id/playDeviceLabel" />
66
67    <RadioGroup xmlns:android="http://schemas.android.com/apk/res/android"
68        android:id="@+id/apiSelectionGroup"
69        android:layout_width="fill_parent"
70        android:layout_height="wrap_content"
71        android:layout_marginStart="@dimen/activity_horizontal_margin"
72        android:layout_marginLeft="@dimen/activity_horizontal_margin"
73        android:layout_marginTop="@dimen/activity_vertical_margin"
74        android:orientation="horizontal"
75        app:layout_constraintTop_toBottomOf="@+id/playback_devices_spinner"
76        app:layout_constraintStart_toStartOf="parent"
77        app:layout_constraintEnd_toEndOf="parent">
78
79        <TextView
80            android:id="@+id/apiTextView"
81            android:layout_width="wrap_content"
82            android:layout_height="wrap_content"
83            android:text="@string/apiSelection" />
84
85        <RadioButton
86            android:id="@+id/aaudioButton"
87            android:layout_width="wrap_content"
88            android:layout_height="wrap_content"
89            android:layout_marginStart="16dp"
90            android:layout_marginLeft="16dp"
91            android:text="@string/aaudio" />
92
93        <RadioButton
94            android:id="@+id/slesButton"
95            android:layout_width="wrap_content"
96            android:layout_height="wrap_content"
97            android:layout_marginStart="16dp"
98            android:layout_marginLeft="16dp"
99            android:text="@string/sles" />
100    </RadioGroup>
101
102    <Button
103        android:id="@+id/button_toggle_effect"
104        android:layout_width="wrap_content"
105        android:layout_height="wrap_content"
106        android:gravity="center"
107        android:layout_marginTop="@dimen/activity_vertical_margin"
108        android:textAllCaps="false"
109        android:text="@string/start_effect"
110        app:layout_constraintStart_toStartOf="parent"
111        app:layout_constraintEnd_toEndOf="parent"
112        app:layout_constraintTop_toBottomOf="@+id/apiSelectionGroup" />
113
114    <TextView
115        android:id="@+id/status_view_text"
116        android:layout_width="0dp"
117        android:layout_height="60dp"
118        android:layout_marginStart="@dimen/activity_horizontal_margin"
119        android:layout_marginEnd="@dimen/activity_horizontal_margin"
120        android:layout_marginTop="@dimen/activity_vertical_group_margin"
121        android:lines="6"
122        android:text="@string/status_warning"
123        app:layout_constraintStart_toStartOf="parent"
124        app:layout_constraintEnd_toEndOf="parent"
125        app:layout_constraintTop_toBottomOf="@+id/button_toggle_effect"
126        app:layout_constraintBottom_toBottomOf="parent" />
127
128</androidx.constraintlayout.widget.ConstraintLayout>
129