From 94364b3f16f93c897a4eb77cdb79757c75217681 Mon Sep 17 00:00:00 2001
From: 62160052 <62160052@go.buu.ac.th>
Date: Mon, 19 Sep 2022 03:42:08 +0700
Subject: [PATCH] Bind the price property to the UI

---
 app/src/main/res/layout/fragment_flavor.xml  | 1 +
 app/src/main/res/layout/fragment_pickup.xml  | 1 +
 app/src/main/res/layout/fragment_summary.xml | 1 +
 3 files changed, 3 insertions(+)

diff --git a/app/src/main/res/layout/fragment_flavor.xml b/app/src/main/res/layout/fragment_flavor.xml
index 45129b9..c5e6d4c 100644
--- a/app/src/main/res/layout/fragment_flavor.xml
+++ b/app/src/main/res/layout/fragment_flavor.xml
@@ -96,6 +96,7 @@
 
             <TextView
                 android:id="@+id/subtotal"
+                android:text="@{@string/subtotal_price(viewModel.price)}"
                 style="@style/Widget.Cupcake.TextView"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
diff --git a/app/src/main/res/layout/fragment_pickup.xml b/app/src/main/res/layout/fragment_pickup.xml
index 0eae801..bc7cd44 100644
--- a/app/src/main/res/layout/fragment_pickup.xml
+++ b/app/src/main/res/layout/fragment_pickup.xml
@@ -93,6 +93,7 @@
 
             <TextView
                 android:id="@+id/subtotal"
+                android:text="@{@string/subtotal_price(viewModel.price)}"
                 style="@style/Widget.Cupcake.TextView"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
diff --git a/app/src/main/res/layout/fragment_summary.xml b/app/src/main/res/layout/fragment_summary.xml
index e1455ec..c9702b5 100644
--- a/app/src/main/res/layout/fragment_summary.xml
+++ b/app/src/main/res/layout/fragment_summary.xml
@@ -119,6 +119,7 @@
 
                 <TextView
                     android:id="@+id/total"
+                    android:text="@{@string/total_price(viewModel.price)}"
                     style="@style/Widget.Cupcake.TextView.FinalPrice"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-- 
GitLab