Sharingang/Sharingang-Android

View on GitHub
app/src/main/res/layout/fragment_search.xml

Summary

Maintainability
Test Coverage
<?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">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        tools:context=".ui.fragments.SearchFragment">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:paddingStart="16dp"
            android:paddingEnd="16dp">

            <EditText
                android:id="@+id/searchText"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/search_hint"
                android:importantForAutofill="no"
                android:inputType="text" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <Spinner
                    android:id="@+id/searchCategorySpinner"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:entries="@array/categories" />

                <com.google.android.material.checkbox.MaterialCheckBox
                    android:id="@+id/searchDiscount"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/discounts"
                    android:layoutDirection="rtl"/>

            </LinearLayout>

            <LinearLayout
                style="?android:attr/buttonBarStyle"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <Button
                    android:id="@+id/sflSearchButton"
                    style="?android:attr/buttonBarButtonStyle"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/search_go_button" />

                <Button
                    android:id="@+id/clearSearchButton"
                    style="?android:attr/buttonBarButtonStyle"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/clear_search_button" />
            </LinearLayout>
        </LinearLayout>


        <GridLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@color/darkBackground"
            android:orientation="vertical"
            android:paddingLeft="4dp"
            android:paddingRight="4dp"
            tools:context=".ui.fragments.SearchFragment">

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/itemSearchList"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:scrollbars="vertical"
                app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
        </GridLayout>

    </LinearLayout>
</layout>