DishDelish/dishdelish-app

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

Summary

Maintainability
Test Coverage
<ScrollView
    android:id="@+id/shoppingCartFragment"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="vertical">

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

        <!-- TODO: Update blank fragment layout -->
        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="Shopping Cart"
            android:gravity="center"
            android:textSize="20sp"
            android:textStyle="bold"
            android:layout_marginTop="30dp"
            android:layout_marginLeft="10dp"
            android:layout_marginRight="10dp"
            android:layout_marginBottom="30dp"
            android:textColor="@color/orange"/>

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

            <EditText
                android:id="@+id/editTextItem"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:hint="Enter item"
                android:inputType="text"
                android:layout_marginEnd="8dp"
                android:layout_marginStart="8dp"
                android:maxLines="1" />

            <Button
                android:id="@+id/buttonAdd"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="8dp"
                android:text="Add" />

        </LinearLayout>

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/shoppingList"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="10dp"
            android:layout_marginTop="15dp" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_marginTop="15dp"
            android:layout_marginBottom="15dp"
            android:gravity="center">

            <Button
                android:id="@+id/buttonClearAll"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Clear All"
                android:layout_marginEnd="10dp" />

            <Button
                android:id="@+id/buttonDeleteSelected"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Delete Selected"
                android:layout_marginStart="10dp" />

        </LinearLayout>

    </LinearLayout>

</ScrollView>