Newer
Older
music / app / src / main / res / layout / fragment_instrument.xml
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    tools:context=".ui.fragments.InstrumentFragment">

    <!-- TODO: Update blank fragment layout -->
    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingBottom="20dp">

        <TextView
            android:id="@+id/instrumentNameText"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginStart="20dp"
            android:layout_marginTop="20dp"
            android:layout_marginEnd="20dp"
            android:text="@string/placeholder"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <com.google.android.material.floatingactionbutton.FloatingActionButton
            android:id="@+id/editInstrumentButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            android:layout_marginTop="16dp"
            android:clickable="true"
            android:contentDescription="@string/edit_instrument_description"
            android:cropToPadding="true"
            android:keepScreenOn="true"
            android:src="@android:drawable/ic_menu_edit"
            app:backgroundTint="#1565C0"
            app:fabSize="mini"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/instrumentNameText" />

        <com.google.android.material.switchmaterial.SwitchMaterial
            android:id="@+id/activeSwitch"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            android:layout_marginTop="16dp"
            android:minHeight="48dp"
            android:text="@string/instrument_active"
            app:layout_constraintStart_toEndOf="@+id/editInstrumentButton"
            app:layout_constraintTop_toBottomOf="@+id/instrumentNameText" />

        <Spinner
            android:id="@+id/waveformSelection"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            android:layout_marginTop="16dp"
            android:layout_marginEnd="16dp"
            android:contentDescription="@string/instrument_type_description"
            android:entries="@array/waveforms"
            android:minHeight="48dp"
            android:spinnerMode="dropdown"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@+id/activeSwitch"
            app:layout_constraintTop_toBottomOf="@+id/instrumentNameText" />
    </androidx.constraintlayout.widget.ConstraintLayout>

</FrameLayout>