Auxio/app/src/main/res/layout/fragment_search.xml
OxygenCobalt 03aa2d4579
Migrate to material theming
Finally move the app from AppCompat the Material Bridge theme. This does a couple things:
- Removes need for runtime styling of material widgets used before
- Allows for a better dialog style [But only after a ton of tinkering and weird hacks]
- Makes theming slightly easier [After all the dumb migration bugs and technicalities are fixed]

I never want to do something like this again. UI styling on android is a nightmare.
2021-04-04 09:20:56 -06:00

61 lines
No EOL
2.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<layout 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">
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/search_appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/background"
android:elevation="@dimen/elevation_normal">
<androidx.appcompat.widget.Toolbar
android:id="@+id/search_toolbar"
style="@style/Toolbar.Style"
android:elevation="@dimen/elevation_normal"
app:layout_scrollFlags="scroll|enterAlways"
app:menu="@menu/menu_search"
app:title="@string/label_search" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/search_text_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:boxStrokeWidthFocused="2dp"
app:boxStrokeColor="?attr/colorPrimary"
app:boxBackgroundMode="filled"
app:boxStrokeWidth="0dp"
app:endIconContentDescription="@string/description_clear_search"
app:endIconDrawable="@drawable/ic_close"
app:endIconMode="clear_text"
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:imeOptions="actionSearch|flagNoExtractUi"
android:inputType="textFilter"
android:padding="@dimen/padding_medium"
android:textCursorDrawable="@drawable/ui_cursor" />
</com.google.android.material.textfield.TextInputLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/search_recycler"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
tools:listitem="@layout/item_song" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>