DishDelish/dishdelish-app

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

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    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_height="match_parent"
    android:layout_width="match_parent"
    android:id="@+id/homeFragment"
    tools:context=".HomePageFragment"
    android:orientation="vertical">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="0.08"
        android:orientation="horizontal"
        android:layout_margin="10dp">

        <SearchView
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:id="@+id/searchView"
            android:queryHint="Recipe name"
            android:iconifiedByDefault="false"
            style="@style/SearchViewStyle"
            tools:ignore="NestedWeights" />

        <TextView
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_weight="1"
            android:id="@+id/moreFilterTextView"
            android:clickable="true"
            android:gravity="center"
            android:textColor="@color/orange"
            android:autoLink="web"
            android:text="more filters"
            android:textSize="20sp"

            tools:ignore="HardcodedText,KeyboardInaccessibleWidget,TouchTargetSizeCheck" />
    </LinearLayout>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/filter"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="10dp"
        android:layout_weight="0"
        android:visibility="gone"
        tools:visibility="visible">

        <Button
            android:id="@+id/btnAllergy"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="10dp"
            android:layout_marginTop="10dp"
            android:layout_marginEnd="10dp"
            android:text="@string/allergy"
            android:textSize="12sp"
            android:textStyle="bold"
            app:layout_constraintEnd_toStartOf="@+id/guideline4"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            tools:ignore="ButtonStyle,NestedWeights,SmallSp,TouchTargetSizeCheck" />

        <Button
            android:id="@+id/btnDiet"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="10dp"
            android:layout_marginTop="10dp"
            android:layout_marginEnd="10dp"
            android:text="@string/diet"
            android:textSize="12sp"
            android:textStyle="bold"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="@+id/guideline4"
            app:layout_constraintTop_toTopOf="parent"
            tools:ignore="ButtonStyle,SmallSp,TouchTargetSizeCheck" />

        <Button
            android:id="@+id/btnCuisine"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="10dp"
            android:layout_marginTop="10dp"
            android:layout_marginEnd="10dp"
            android:text="@string/cuisineTypes"
            android:textSize="12sp"
            android:textStyle="bold"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="@+id/guideline4"
            app:layout_constraintTop_toBottomOf="@+id/btnDiet"
            tools:ignore="ButtonStyle,SmallSp,TouchTargetSizeCheck" />

        <CheckBox
            android:id="@+id/btnFridge"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="10dp"
            android:layout_marginTop="10dp"
            android:layout_marginEnd="10dp"
            android:text="@string/filterMyFridge"
            android:textSize="14sp"
            android:textStyle="bold"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@+id/guideline4"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/btnAllergy"
            tools:ignore="ButtonStyle,SmallSp,TouchTargetSizeCheck" />

        <androidx.constraintlayout.widget.Guideline
            android:id="@+id/guideline4"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            app:layout_constraintGuide_percent="0.5" />

    </androidx.constraintlayout.widget.ConstraintLayout>


    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="0.92"
        android:id="@+id/recipeListLinearLayout"
        android:orientation="vertical"
        >
        <androidx.recyclerview.widget.RecyclerView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:id="@+id/rand_recipe_recyclerView"
            android:layout_margin="4dp"/>
    </LinearLayout>

</LinearLayout>