<?xml version="1.0" encoding="utf-8"?>
<ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:fillViewport="true"
    tools:context="com.mobileer.oboetester.ManualGlitchActivity"
    >
<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin">

    <com.mobileer.oboetester.StreamConfigurationView
        android:id="@+id/inputStreamConfiguration"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:orientation="horizontal" />

    <com.mobileer.oboetester.InputMarginView
        android:id="@+id/input_margin_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center" />

    <com.mobileer.oboetester.StreamConfigurationView
        android:id="@+id/outputStreamConfiguration"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:orientation="horizontal" />

    <com.mobileer.oboetester.BufferSizeView
        android:id="@+id/buffer_size_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:orientation="horizontal" />

    <LinearLayout
        android:id="@+id/layoutGlitch"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <TextView
            android:id="@+id/textTolerance"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Tolerance" />

        <SeekBar
            android:id="@+id/faderTolerance"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:max="1000"
            android:progress="1000" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">

        <Button
            android:id="@+id/button_start"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="wrap_content"
            android:onClick="onStartAudioTest"
            android:text="@string/startAudio" />

        <Button
            android:id="@+id/button_stop"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="wrap_content"
            android:onClick="onStopAudioTest"
            android:text="@string/stopAudio"
            />

        <Button
            android:id="@+id/button_share"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="wrap_content"
            android:onClick="onShareFile"
            android:text="@string/share"
            />
    </LinearLayout>

    <TextView
        android:id="@+id/text_status"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:lines="14"
        android:text="@string/loopback_instructions_glitch"
        android:textSize="14sp"
        android:textStyle="bold" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">

        <CheckBox
            android:id="@+id/boxForceGlitch"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="6dp"
            android:checked="false"
            android:onClick="onForceGlitchClicked"
            android:text="Force glitches"/>
        <CheckBox
            android:id="@+id/boxAutoScope"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="6dp"
            android:checked="true"
            android:text="Auto draw"/>

    </LinearLayout>
    <com.mobileer.oboetester.WaveformView
        android:id="@+id/waveview_audio"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:minHeight="200dp"
        />
</LinearLayout>
</ScrollView>
