Auxio/app/src/main/res/layout/fragment_search.xml
OxygenCobalt 828ab3ccee
styles: refactor styles
Refactor styles again, this time trying to seperate the more
layout-specific attributes so that layouts become more re-usable.
This also updates the naming conventions of styles.
2021-08-06 09:36:56 -06:00

62 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="?attr/colorSurface"
android:elevation="@dimen/elevation_normal">
<androidx.appcompat.widget.Toolbar
android:id="@+id/search_toolbar"
style="@style/Widget.Toolbar"
android:elevation="0dp"
app:layout_scrollFlags="scroll|enterAlways"
app:menu="@menu/menu_search"
app:title="@string/lbl_search" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/search_text_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:boxBackgroundMode="filled"
app:boxStrokeColor="?attr/colorPrimary"
app:boxStrokeWidth="0dp"
app:boxStrokeWidthFocused="2dp"
app:endIconContentDescription="@string/desc_clear_search"
app:endIconDrawable="@drawable/ic_close"
app:endIconTint="?attr/colorControlNormal"
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="?attr/colorSurface"
android:hint="@string/hint_search_library"
android:imeOptions="actionSearch|flagNoExtractUi"
android:inputType="textFilter"
android:padding="@dimen/spacing_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>