Move song search to SongsFragment

Move the ability to search for songs to SongsFragment for better consistency. May switch to a dedicated search tab in the future but I generally like how this looks.
This commit is contained in:
OxygenCobalt
2021-01-06 15:54:33 -07:00
parent 332d1d0170
commit 22ab5ad255
9 changed files with 208 additions and 34 deletions
+2 -1
View File
@@ -12,9 +12,10 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/song_toolbar"
style="@style/Toolbar.Style"
style="@style/Toolbar.Style.Search"
android:background="?android:attr/windowBackground"
android:elevation="@dimen/elevation_normal"
android:theme="@style/Toolbar.Style.Search"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:menu="@menu/menu_songs"
+11 -2
View File
@@ -1,9 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
<menu xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_search"
android:icon="@drawable/ic_search"
android:title="@string/label_search"
app:actionViewClass="androidx.appcompat.widget.SearchView"
app:showAsAction="collapseActionView|always"
tools:ignore="AlwaysShowAction" />
<item
android:id="@+id/action_shuffle"
android:icon="@drawable/ic_shuffle"
android:title="@string/label_shuffle"
app:showAsAction="ifRoom" />
app:showAsAction="always" />
</menu>
+1
View File
@@ -110,6 +110,7 @@
<!-- Hint Namespace | EditText Hints -->
<string name="hint_search_library">Search Library…</string>
<string name="hint_search_songs">Search Songs…</string>
<!-- Description Namespace | Accessibility Strings -->
<string name="description_album_cover">Album Cover for %s</string>