search: collapse uis into single bar
Merge the search view and the redundant appbar into a single view. Also fix another Material3 regression that stemmed from a bad text highlight color.
This commit is contained in:
parent
2d5c438c58
commit
7ef10fa4f8
6 changed files with 41 additions and 36 deletions
|
@ -31,7 +31,6 @@ import org.oxycblt.auxio.util.resolveStateList
|
|||
* @author OxygenCobalt
|
||||
* @param onSelect What to do when an accent is selected.
|
||||
*/
|
||||
|
||||
class AccentAdapter(
|
||||
private var curAccent: Accent,
|
||||
private val onSelect: (accent: Accent) -> Unit
|
||||
|
|
|
@ -61,13 +61,12 @@ import org.oxycblt.auxio.util.logD
|
|||
* table, so we have to go for the less efficent "make a big query on all the songs lol" method
|
||||
* so that songs don't end up fragmented across artists. Pretty much every OEM has added some
|
||||
* extension or quirk to MediaStore that I cannot reproduce, with some OEMs (COUGHSAMSUNGCOUGH)
|
||||
* crippling the normal tables so that you're railroaded into their ad-infested music app.
|
||||
* The way I do blacklisting relies on a deprecated method, and the supposedly "modern" method
|
||||
* is SLOWER and causes even more problems since I have to manage databases across version
|
||||
* boundaries. Sometimes music will have a deformed clone that I can't filter out, sometimes
|
||||
* Genres will just break for no reason, sometimes this spaghetti parser just completely breaks
|
||||
* down and is unable to get any metadata. Everything is broken in it's own special unique way and
|
||||
* I absolutely hate it.
|
||||
* crippling the normal tables so that you're railroaded into their music app. The way I do
|
||||
* blacklisting relies on a deprecated method, and the supposedly "modern" method is SLOWER and
|
||||
* causes even more problems since I have to manage databases across version boundaries. Sometimes
|
||||
* music will have a deformed clone that I can't filter out, sometimes Genres will just break for no
|
||||
* reason, sometimes this spaghetti parser just completely breaks down and is unable to get any
|
||||
* metadata. Everything is broken in it's own special unique way and I absolutely hate it.
|
||||
*
|
||||
* Is there anything we can do about it? No. Google has routinely shut down issues that begged google
|
||||
* to fix glaring issues with MediaStore or to just take the API behind the woodshed and shoot it.
|
||||
|
|
4
app/src/main/res/color/overlay_text_highlight.xml
Normal file
4
app/src/main/res/color/overlay_text_highlight.xml
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:alpha="0.60" android:color="?attr/colorPrimary" />
|
||||
</selector>
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:alpha="0.60" android:color="?attr/colorPrimaryInverse" />
|
||||
</selector>
|
|
@ -18,36 +18,33 @@
|
|||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/search_toolbar"
|
||||
style="@style/Widget.Auxio.Toolbar.Icon"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:menu="@menu/menu_search"
|
||||
app:title="@string/lbl_search" />
|
||||
app:menu="@menu/menu_search">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/search_text_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:hintEnabled="false"
|
||||
app:boxBackgroundMode="filled"
|
||||
app:boxStrokeColor="?attr/colorPrimary"
|
||||
app:boxStrokeWidth="0dp"
|
||||
app:boxStrokeWidthFocused="@dimen/size_stroke_large"
|
||||
app:endIconContentDescription="@string/desc_clear_search"
|
||||
app:endIconDrawable="@drawable/ic_close"
|
||||
app:endIconMode="clear_text"
|
||||
app:endIconTint="?attr/colorControlNormal"
|
||||
app:errorEnabled="false">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/search_edit_text"
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/search_text_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="@string/hint_search_library"
|
||||
android:padding="@dimen/spacing_medium"
|
||||
android:imeOptions="actionSearch|flagNoExtractUi"
|
||||
android:inputType="textFilter" />
|
||||
app:hintEnabled="false"
|
||||
app:endIconContentDescription="@string/desc_clear_search"
|
||||
app:endIconDrawable="@drawable/ic_close"
|
||||
app:endIconMode="clear_text"
|
||||
app:endIconTint="?attr/colorControlNormal"
|
||||
app:errorEnabled="false">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/search_edit_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="@string/hint_search_library"
|
||||
android:padding="@dimen/spacing_medium"
|
||||
android:imeOptions="actionSearch|flagNoExtractUi"
|
||||
android:inputType="textFilter" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</org.oxycblt.auxio.ui.LiftAppBarLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
|
|
@ -17,12 +17,14 @@
|
|||
<item name="colorOnTertiaryContainer">?attr/colorOnPrimaryContainer</item>
|
||||
|
||||
<item name="colorSurface">@color/surface</item>
|
||||
<item name="colorAccent">?attr/colorPrimary</item>
|
||||
<item name="colorControlNormal">@color/control</item>
|
||||
<item name="colorControlHighlight">@color/overlay_selection</item>
|
||||
<item name="colorControlActivated">?attr/colorPrimary</item>
|
||||
|
||||
<item name="colorAccent">?attr/colorPrimary</item>
|
||||
</style>>
|
||||
<item name="android:textColorHighlight">@color/overlay_text_highlight</item>
|
||||
<item name="android:textColorHighlightInverse">@color/overlay_text_highlight_inverse</item>
|
||||
</style>
|
||||
|
||||
<!-- Base theme -->
|
||||
<style name="Theme.Auxio.App" parent="Theme.Auxio.V31">
|
||||
|
|
Loading…
Reference in a new issue