detail: add framework for song details

Add the basic framework for a song detail view.
This commit is contained in:
OxygenCobalt
2022-06-11 13:29:06 -06:00
parent 277e5a151f
commit 3f85678d99
12 changed files with 387 additions and 2 deletions
@@ -0,0 +1,131 @@
<?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="match_parent"
android:paddingTop="@dimen/spacing_medium">
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/detail_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingStart="@dimen/spacing_mid_large"
android:paddingEnd="@dimen/spacing_mid_large"
android:visibility="gone"
tools:visibility="visible">
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/lbl_file_name"
app:expandedHintEnabled="false">
<org.oxycblt.auxio.detail.ReadOnlyTextInput
android:id="@+id/detail_file_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="file.mp3" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_medium"
android:hint="@string/lbl_relative_path"
app:expandedHintEnabled="false">
<org.oxycblt.auxio.detail.ReadOnlyTextInput
android:id="@+id/detail_relative_path"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="/path/to" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_medium"
android:hint="@string/lbl_format"
app:expandedHintEnabled="false">
<org.oxycblt.auxio.detail.ReadOnlyTextInput
android:id="@+id/detail_format"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="MP3" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_medium"
app:expandedHintEnabled="false"
android:hint="@string/lbl_size">
<org.oxycblt.auxio.detail.ReadOnlyTextInput
android:id="@+id/detail_size"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="16 MB" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_medium"
android:hint="@string/lbl_sort_duration"
app:expandedHintEnabled="false">
<org.oxycblt.auxio.detail.ReadOnlyTextInput
android:id="@+id/detail_duration"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="3:20" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_medium"
android:hint="@string/lbl_bitrate"
app:expandedHintEnabled="false">
<org.oxycblt.auxio.detail.ReadOnlyTextInput
android:id="@+id/detail_bitrate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="320 kb/s" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_medium"
android:hint="@string/lbl_sample_rate"
app:expandedHintEnabled="false">
<org.oxycblt.auxio.detail.ReadOnlyTextInput
android:id="@+id/detail_sample_rate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="44100 Hz" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</FrameLayout>
@@ -12,4 +12,7 @@
<item
android:id="@+id/action_go_album"
android:title="@string/lbl_go_album" />
<item
android:id="@+id/action_song_detail"
android:title="@string/lbl_song_detail" />
</menu>
+13
View File
@@ -47,6 +47,15 @@
<string name="lbl_go_artist">Go to artist</string>
<string name="lbl_go_album">Go to album</string>
<string name="lbl_song_detail">View properties</string>
<string name="lbl_props">File properties</string>
<string name="lbl_file_name">File name</string>
<string name="lbl_relative_path">Relative path</string>
<string name="lbl_format">Format</string>
<string name="lbl_size">Size</string>
<string name="lbl_bitrate">Bitrate</string>
<string name="lbl_sample_rate">Sample rate</string>
<string name="lbl_state_saved">State saved</string>
@@ -160,6 +169,8 @@
<string name="def_date">No Date</string>
<string name="def_track">No Track Number</string>
<string name="def_playback">No music playing</string>
<string name="def_bitrate">No Bitrate</string>
<string name="def_sample_rate">No Sample Rate</string>
<string name="def_widget_song">Song Name</string>
<string name="def_widget_artist">Artist Name</string>
@@ -187,6 +198,8 @@
<string name="fmt_db_pos">+%.1f dB</string>
<string name="fmt_db_neg">-%.1f dB</string>
<string name="fmt_bitrate">%d KB/s</string>
<string name="fmt_sample_rate">%d Hz</string>
<string name="fmt_indexing">Loading your music library… (%1$d/%2$d)</string>
+1
View File
@@ -33,6 +33,7 @@
<item name="materialAlertDialogTheme">@style/Theme.Auxio.Dialog</item>
<item name="sliderStyle">@style/Widget.Auxio.Slider</item>
<item name="linearProgressIndicatorStyle">@style/Widget.Auxio.LinearProgressIndicator</item>
<item name="textInputStyle">@style/Widget.Material3.TextInputLayout.OutlinedBox</item>
<item name="textAppearanceDisplayLarge">@style/TextAppearance.Auxio.DisplayLarge</item>
<item name="textAppearanceDisplayMedium">@style/TextAppearance.Auxio.DisplayMedium</item>
+1
View File
@@ -54,6 +54,7 @@
app:summary="@string/set_quality_covers_desc"
app:title="@string/set_quality_covers" />
<!-- FIXME: Should not be dependent on cover option -->
<org.oxycblt.auxio.settings.pref.M3SwitchPreference
app:defaultValue="false"
app:dependency="KEY_SHOW_COVERS"