IanTDuncan / MealTime

Project for CSC 480
0 stars 0 forks source link

UI Overhaul -- Meal Result XML Update #193

Closed BeepDroid closed 2 months ago

BeepDroid commented 2 months ago

UI Overhaul -- Meal Result XML Update

Description:


An update to our Meal Result page to add some more color and design.

Steps to Reproduce:


Add a FrameLayout to hold the back button. Update the buttons with the background xml to be an arrow. Adjust to buttons to best fit our whitespace.

Expected vs. Actual Behavior:


Implementation of new design that works with the code. It does indeed work.

Code Snippets:

<?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"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#FFFFFF">

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/mealRecyclerView"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_marginTop="60dp"
        android:layout_marginBottom="60dp"
        android:background="@color/lettuce_green"
        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <Button
        android:id="@+id/backButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="#000000"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        android:layout_marginStart="16dp"
        android:background="@drawable/ic_arrow_back"
        android:layout_marginTop="16dp"/>

    <Button
        android:id="@+id/btn_go_back"
        android:layout_width="125dp"
        android:layout_height="30dp"
        android:layout_marginStart="20dp"
        android:layout_marginTop="700dp"
        android:gravity="center"
        android:text="Re-Generate"
        android:background="@drawable/button_border"
        android:textColor="@color/white"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintBottom_toBottomOf="parent" />

    <Button
        android:id="@+id/btn_save_meal"
        android:layout_width="100dp"
        android:layout_height="30dp"
        android:layout_marginTop="700dp"
        android:layout_marginEnd="25dp"
        android:layout_marginBottom="0dp"
        android:gravity="center"
        android:text="Save Meal"
        android:background="@drawable/button_border"
        android:textColor="@color/white"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintBottom_toBottomOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

Environment Details:


Android Studio, Windows OS.

Current Status:


Completed