diff --git a/app/src/main/res/layout/fragment_flavor.xml b/app/src/main/res/layout/fragment_flavor.xml index 1f5abdd8c95c27704aef0476b6e5eb3e3b0cec8c..e3816eb5ef5c19e10da9531f3bbe54f5073cb0e7 100644 --- a/app/src/main/res/layout/fragment_flavor.xml +++ b/app/src/main/res/layout/fragment_flavor.xml @@ -110,6 +110,17 @@ app:layout_constraintTop_toBottomOf="@id/divider" tools:text="Subtotal $5.00" /> + <Button + android:id="@+id/cancel_button" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="@string/cancel" + android:layout_marginEnd="@dimen/side_margin" + style="?attr/materialButtonOutlinedStyle" + app:layout_constraintEnd_toStartOf="@id/next_button" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="@id/next_button" /> + <Button android:id="@+id/next_button" android:onClick="@{() -> flavorFragment.goToNextScreen()}" @@ -119,7 +130,7 @@ android:text="@string/next" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" + app:layout_constraintStart_toEndOf="@id/cancel_button" app:layout_constraintTop_toBottomOf="@id/subtotal" /> </androidx.constraintlayout.widget.ConstraintLayout> diff --git a/app/src/main/res/layout/fragment_pickup.xml b/app/src/main/res/layout/fragment_pickup.xml index 20459e953d71b4bf9a098f9c20222af4a2494b69..fbba9bab8ad0742fc0868b2be99ee622d713d80c 100644 --- a/app/src/main/res/layout/fragment_pickup.xml +++ b/app/src/main/res/layout/fragment_pickup.xml @@ -106,6 +106,17 @@ app:layout_constraintTop_toBottomOf="@id/divider" tools:text="Subtotal $5.00" /> + <Button + android:id="@+id/cancel_button" + style="?attr/materialButtonOutlinedStyle" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginEnd="@dimen/side_margin" + android:text="@string/cancel" + app:layout_constraintEnd_toStartOf="@id/next_button" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="@id/next_button" /> + <Button android:id="@+id/next_button" android:onClick="@{() -> pickupFragment.goToNextScreen()}" @@ -115,7 +126,7 @@ android:text="@string/next" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" + app:layout_constraintStart_toEndOf="@id/cancel_button" app:layout_constraintTop_toBottomOf="@id/subtotal" /> </androidx.constraintlayout.widget.ConstraintLayout> diff --git a/app/src/main/res/layout/fragment_summary.xml b/app/src/main/res/layout/fragment_summary.xml index 720a3d0858a97f46850d22fde4e5395d78eb7e6e..b7ad9e47582fc78c4ea39e337fb04c5ef8a65d27 100644 --- a/app/src/main/res/layout/fragment_summary.xml +++ b/app/src/main/res/layout/fragment_summary.xml @@ -141,6 +141,14 @@ android:layout_marginTop="@dimen/side_margin" android:text="@string/send" /> + <Button + android:id="@+id/cancel_button" + style="?attr/materialButtonOutlinedStyle" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/margin_between_elements" + android:text="@string/cancel" /> + </LinearLayout> </ScrollView> </layout> \ No newline at end of file diff --git a/app/src/main/res/navigation/nav_graph.xml b/app/src/main/res/navigation/nav_graph.xml index 32218fc988b67af9f02344959dc2ca3971ab5f1d..99c61b10698cbadf21ce0df89d54f3a7da2c00bb 100644 --- a/app/src/main/res/navigation/nav_graph.xml +++ b/app/src/main/res/navigation/nav_graph.xml @@ -35,6 +35,9 @@ <action android:id="@+id/action_flavorFragment_to_pickupFragment" app:destination="@id/pickupFragment" /> + <action + android:id="@+id/action_flavorFragment_to_startFragment" + app:destination="@id/startFragment" /> </fragment> <fragment android:id="@+id/pickupFragment" @@ -44,10 +47,17 @@ <action android:id="@+id/action_pickupFragment_to_summaryFragment" app:destination="@id/summaryFragment" /> + <action + android:id="@+id/action_pickupFragment_to_startFragment" + app:destination="@id/startFragment" /> </fragment> <fragment android:id="@+id/summaryFragment" android:name="com.example.cupcake.SummaryFragment" android:label="@string/order_summary" - tools:layout="@layout/fragment_summary" /> + tools:layout="@layout/fragment_summary" > + <action + android:id="@+id/action_summaryFragment_to_startFragment" + app:destination="@id/startFragment" /> + </fragment> </navigation> \ No newline at end of file