app/src/main/res/layout/activity_filtering_sales.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activities.FilteringSalesActivity">
<!-- Reset default filtering values-->
<Button
android:id="@+id/reset_button"
android:text= "@string/reset"
android:onClick="resetParameters"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="9dp"
android:layout_marginEnd="9dp"
android:textAllCaps="false"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
style="@style/Button"/>
<!-- Go to results -->
<Button
android:id="@+id/results_button"
android:text="@string/results"
android:onClick="getResults"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="9dp"
android:textAllCaps="false"
app:layout_constraintBottom_toTopOf="@id/bottom_navigation"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
style="@style/Button"/>
<!-- Lists of parameters -->
<ScrollView
android:id="@+id/main_scroll"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/results_button"
app:layout_constraintTop_toBottomOf="@+id/reset_button"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintVertical_bias="1.0"
app:layout_goneMarginBottom="9dp"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="9dp">
<!-- Search a book name and or isbn -->
<LinearLayout
android:id="@+id/name_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/name"
android:textAllCaps="false"
android:textSize="20sp" />
<EditText
android:id="@+id/book_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="@string/enter_book_name"
android:importantForAutofill="no"
android:inputType="textFilter" />
</LinearLayout>
<!-- Search an ISBN -->
<LinearLayout
android:id="@+id/isbn_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/book_isbn"
android:textAllCaps="false"
android:textSize="20sp" />
<EditText
android:id="@+id/book_isbn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="@string/enter_book_isbn"
android:importantForAutofill="no"
android:inputType="textFilter" />
</LinearLayout>
<!-- Set range of price -->
<LinearLayout
android:id="@+id/price_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/sale_price"
android:textAllCaps="false"
android:textSize="20sp" />
<EditText
android:id="@+id/price_min"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="@string/enter_min_price"
android:importantForAutofill="no"
android:maxLength="4"
android:inputType="numberDecimal" />
<EditText
android:id="@+id/price_max"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="@string/enter_max_price"
android:importantForAutofill="no"
android:maxLength="4"
android:inputType="numberDecimal" />
</LinearLayout>
<!-- Sort by parameter -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:text="@string/sort_by"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAllCaps="false"
android:textSize="20sp" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/sale_sort_parameter"
android:nestedScrollingEnabled="false"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</androidx.recyclerview.widget.RecyclerView>
</LinearLayout>
<!-- State (eg. active, concluded) -->
<LinearLayout
android:id="@+id/state_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/sale_state"
android:textAllCaps="false"
android:textSize="20sp" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/sale_state_parameter"
android:nestedScrollingEnabled="false"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</androidx.recyclerview.widget.RecyclerView>
</LinearLayout>
<!-- Condition (eg. GOOD, WORN) -->
<LinearLayout
android:id="@+id/condition_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/sale_book_condition"
android:textAllCaps="false"
android:textSize="20sp" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/sale_condition_parameter"
android:nestedScrollingEnabled="false"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</androidx.recyclerview.widget.RecyclerView>
</LinearLayout>
<!-- Field parameter (eg. Computer Science, Biology) -->
<LinearLayout
android:id="@+id/field_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/interest_field"
android:textAllCaps="false"
android:textSize="20sp" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/field_parameter"
android:nestedScrollingEnabled="false"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</androidx.recyclerview.widget.RecyclerView>
</LinearLayout>
<!-- Semester Parameter (eg. IC-BA1, MA-BA6) -->
<LinearLayout
android:id="@+id/semester_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/interest_semester"
android:textAllCaps="false"
android:textSize="20sp" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/semester_parameter"
android:nestedScrollingEnabled="false"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</androidx.recyclerview.widget.RecyclerView>
</LinearLayout>
<!-- Course parameter (eg. CS306) -->
<LinearLayout
android:id="@+id/course_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/interest_course"
android:textAllCaps="false"
android:textSize="20sp" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/course_parameter"
android:nestedScrollingEnabled="false"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</androidx.recyclerview.widget.RecyclerView>
</LinearLayout>
</LinearLayout>
</ScrollView>
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:menu="@menu/bottom_navigation_menu"
app:layout_constraintBottom_toBottomOf="parent"
app:labelVisibilityMode="labeled"
/>
</androidx.constraintlayout.widget.ConstraintLayout>