Gitlab@Informatics

Skip to content
Snippets Groups Projects
Commit 32f90771 authored by 62160052's avatar 62160052
Browse files

Add Cancel button to layout

parent a3809b42
Branches
No related tags found
No related merge requests found
...@@ -110,6 +110,17 @@ ...@@ -110,6 +110,17 @@
app:layout_constraintTop_toBottomOf="@id/divider" app:layout_constraintTop_toBottomOf="@id/divider"
tools:text="Subtotal $5.00" /> 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 <Button
android:id="@+id/next_button" android:id="@+id/next_button"
android:onClick="@{() -> flavorFragment.goToNextScreen()}" android:onClick="@{() -> flavorFragment.goToNextScreen()}"
...@@ -119,7 +130,7 @@ ...@@ -119,7 +130,7 @@
android:text="@string/next" android:text="@string/next"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toEndOf="@id/cancel_button"
app:layout_constraintTop_toBottomOf="@id/subtotal" /> app:layout_constraintTop_toBottomOf="@id/subtotal" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
......
...@@ -106,6 +106,17 @@ ...@@ -106,6 +106,17 @@
app:layout_constraintTop_toBottomOf="@id/divider" app:layout_constraintTop_toBottomOf="@id/divider"
tools:text="Subtotal $5.00" /> 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 <Button
android:id="@+id/next_button" android:id="@+id/next_button"
android:onClick="@{() -> pickupFragment.goToNextScreen()}" android:onClick="@{() -> pickupFragment.goToNextScreen()}"
...@@ -115,7 +126,7 @@ ...@@ -115,7 +126,7 @@
android:text="@string/next" android:text="@string/next"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toEndOf="@id/cancel_button"
app:layout_constraintTop_toBottomOf="@id/subtotal" /> app:layout_constraintTop_toBottomOf="@id/subtotal" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
......
...@@ -141,6 +141,14 @@ ...@@ -141,6 +141,14 @@
android:layout_marginTop="@dimen/side_margin" android:layout_marginTop="@dimen/side_margin"
android:text="@string/send" /> 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> </LinearLayout>
</ScrollView> </ScrollView>
</layout> </layout>
\ No newline at end of file
...@@ -35,6 +35,9 @@ ...@@ -35,6 +35,9 @@
<action <action
android:id="@+id/action_flavorFragment_to_pickupFragment" android:id="@+id/action_flavorFragment_to_pickupFragment"
app:destination="@id/pickupFragment" /> app:destination="@id/pickupFragment" />
<action
android:id="@+id/action_flavorFragment_to_startFragment"
app:destination="@id/startFragment" />
</fragment> </fragment>
<fragment <fragment
android:id="@+id/pickupFragment" android:id="@+id/pickupFragment"
...@@ -44,10 +47,17 @@ ...@@ -44,10 +47,17 @@
<action <action
android:id="@+id/action_pickupFragment_to_summaryFragment" android:id="@+id/action_pickupFragment_to_summaryFragment"
app:destination="@id/summaryFragment" /> app:destination="@id/summaryFragment" />
<action
android:id="@+id/action_pickupFragment_to_startFragment"
app:destination="@id/startFragment" />
</fragment> </fragment>
<fragment <fragment
android:id="@+id/summaryFragment" android:id="@+id/summaryFragment"
android:name="com.example.cupcake.SummaryFragment" android:name="com.example.cupcake.SummaryFragment"
android:label="@string/order_summary" 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> </navigation>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment