Newer
Older
music / app / src / main / res / layout / fragment_instrument.xml
<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (C) 2022 Lukas Eisenhauer
  ~
  ~ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or(at your option) any later version.
  ~
  ~ This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License along with this program.  If not, see <https://www.gnu.org/licenses/>.
  -->

<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: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>