playback: add pre-amp customization
Implement a UI frontend for customizing the ReplayGain pre-amp value. This finally completes Auxio's ReplayGain implementation. Not only that, it also shows how Auxio can use positive ReplayGain values, unlike other apps. As a side-note, this also fiddles with the dialog style somewhat. I got carried away. Resolves #114.
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="@dimen/spacing_small">
|
||||
android:paddingTop="@dimen/spacing_medium">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/excluded_recycler"
|
||||
@@ -22,7 +22,10 @@
|
||||
android:id="@+id/excluded_empty"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/spacing_medium"
|
||||
android:paddingTop="@dimen/spacing_medium"
|
||||
android:paddingStart="@dimen/spacing_medium"
|
||||
android:paddingEnd="@dimen/spacing_medium"
|
||||
android:paddingBottom="@dimen/spacing_medium"
|
||||
android:text="@string/lbl_no_dirs"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="@style/TextAppearance.Auxio.TitleMidLarge"
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/with_tags_header"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_medium"
|
||||
android:layout_marginStart="@dimen/spacing_mid_large"
|
||||
android:text="@string/set_pre_amp_with"
|
||||
android:textAppearance="@style/TextAppearance.Auxio.TitleMedium"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.slider.Slider
|
||||
android:id="@+id/with_tags_slider"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:stepSize="0.1"
|
||||
android:valueFrom="-15.0"
|
||||
android:valueTo="15.0"
|
||||
app:labelBehavior="gone"
|
||||
app:thumbRadius="@dimen/slider_thumb_radius"
|
||||
app:haloRadius="@dimen/slider_halo_radius"
|
||||
app:tickVisible="false"
|
||||
android:layout_marginStart="@dimen/spacing_small"
|
||||
app:layout_constraintEnd_toStartOf="@+id/with_tags_ticker"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/with_tags_header"
|
||||
tools:value="0.0" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/with_tags_ticker"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="@dimen/size_btn_large"
|
||||
android:layout_marginEnd="@dimen/spacing_mid_large"
|
||||
android:gravity="center"
|
||||
android:textAppearance="@style/TextAppearance.Auxio.BodyMedium"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/with_tags_slider"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/with_tags_slider"
|
||||
tools:text="+1.6 dB" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/without_tags_header"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_medium"
|
||||
android:layout_marginStart="@dimen/spacing_mid_large"
|
||||
android:text="@string/set_pre_amp_without"
|
||||
android:textAppearance="@style/TextAppearance.Auxio.TitleMedium"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/with_tags_slider" />
|
||||
|
||||
<com.google.android.material.slider.Slider
|
||||
android:id="@+id/without_tags_slider"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:stepSize="0.1"
|
||||
android:valueFrom="-15.0"
|
||||
android:valueTo="15.0"
|
||||
app:thumbRadius="@dimen/slider_thumb_radius"
|
||||
app:haloRadius="@dimen/slider_halo_radius"
|
||||
android:layout_marginStart="@dimen/spacing_small"
|
||||
app:tickVisible="false"
|
||||
app:labelBehavior="gone"
|
||||
app:layout_constraintEnd_toStartOf="@+id/without_tags_ticker"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/without_tags_header"
|
||||
tools:value="0.0" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/without_tags_ticker"
|
||||
android:layout_width="0dp"
|
||||
android:gravity="center"
|
||||
android:minWidth="@dimen/size_btn_large"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.Auxio.BodyMedium"
|
||||
android:layout_marginEnd="@dimen/spacing_mid_large"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/without_tags_slider"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/without_tags_slider"
|
||||
tools:text="+1.6 dB" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pre_amp_notice"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_medium"
|
||||
android:text="@string/set_pre_amp_warning"
|
||||
android:layout_marginStart="@dimen/spacing_mid_large"
|
||||
android:layout_marginEnd="@dimen/spacing_mid_large"
|
||||
android:textAppearance="@style/TextAppearance.Auxio.BodySmall"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/without_tags_slider" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -6,7 +6,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="never"
|
||||
android:paddingTop="@dimen/spacing_small"
|
||||
android:paddingTop="@dimen/spacing_medium"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintBottom_toTopOf="@+id/accent_cancel"
|
||||
app:layout_constraintTop_toBottomOf="@+id/accent_header"
|
||||
|
||||
@@ -3,11 +3,8 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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"
|
||||
style="@style/Widget.Auxio.ItemLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:padding="0dp">
|
||||
|
||||
<TextView
|
||||
@@ -15,7 +12,10 @@
|
||||
style="@style/Widget.Auxio.TextView.Item.Primary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/spacing_medium"
|
||||
android:layout_marginStart="@dimen/spacing_mid_large"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:paddingTop="@dimen/spacing_small"
|
||||
android:paddingBottom="@dimen/spacing_small"
|
||||
android:gravity="center"
|
||||
android:maxLines="@null"
|
||||
android:textAppearance="@style/TextAppearance.Auxio.BodyLarge"
|
||||
@@ -29,11 +29,15 @@
|
||||
android:id="@+id/excluded_clear"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/spacing_small"
|
||||
android:background="@drawable/ui_unbounded_ripple"
|
||||
android:contentDescription="@string/desc_blacklist_delete"
|
||||
android:minWidth="@dimen/size_btn_small"
|
||||
android:minHeight="@dimen/size_btn_small"
|
||||
android:paddingTop="@dimen/spacing_small"
|
||||
android:paddingBottom="@dimen/spacing_small"
|
||||
android:paddingEnd="@dimen/spacing_medium"
|
||||
android:paddingStart="@dimen/spacing_medium"
|
||||
android:layout_marginEnd="@dimen/spacing_small"
|
||||
android:src="@drawable/ic_clear"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
android:clickable="false"
|
||||
android:layout_marginTop="@dimen/spacing_small"
|
||||
android:layout_marginBottom="@dimen/spacing_small"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:paddingStart="@dimen/spacing_medium"
|
||||
android:textAppearance="@style/TextAppearance.Auxio.BodyLarge"
|
||||
@@ -39,6 +39,7 @@
|
||||
android:minHeight="@dimen/size_btn_small"
|
||||
android:paddingStart="@dimen/spacing_medium"
|
||||
android:paddingEnd="@dimen/spacing_medium"
|
||||
android:layout_marginEnd="@dimen/spacing_small"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_handle"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tab_icon"
|
||||
|
||||
Reference in New Issue
Block a user