ganti tombol

This commit is contained in:
202310715043 MUHAMMAD RAFLY AL FATHIR 2025-10-29 11:07:44 +07:00
parent edf344034f
commit 380ec0eb85
3 changed files with 20 additions and 20 deletions

View File

@ -19,16 +19,16 @@ import com.example.cupcake.R
object DataSource {
val flavors = listOf(
R.string.vanilla,
R.string.chocolate,
R.string.red_velvet,
R.string.salted_caramel,
R.string.coffee
R.string.puttanesca,
R.string.bolognese,
R.string.carbonara,
R.string.alfredo,
R.string.amatriciana
)
val quantityOptions = listOf(
Pair(R.string.one_cupcake, 1),
Pair(R.string.six_cupcakes, 6),
Pair(R.string.twelve_cupcakes, 12)
Pair(R.string.one_spaghetti, 1),
Pair(R.string.six_spaghetti, 6),
Pair(R.string.twelve_spaghetti, 12)
)
}

View File

@ -55,7 +55,7 @@ fun OrderSummaryScreen(
val resources = LocalContext.current.resources
val numberOfCupcakes = resources.getQuantityString(
R.plurals.cupcakes,
R.plurals.spaghetti,
orderUiState.quantity,
orderUiState.quantity
)

View File

@ -16,15 +16,15 @@
<resources>
<string name="app_name">Cupcake</string>
<string name="order_spagheti">Order Spagheti</string>
<string name="one_cupcake">One Cupcake</string>
<string name="six_cupcakes">Six Cupcakes</string>
<string name="twelve_cupcakes">Twelve Cupcakes</string>
<string name="one_spaghetti">One spaghetti</string>
<string name="six_spaghetti">Six spaghetti</string>
<string name="twelve_spaghetti">Twelve spaghetti</string>
<string name="choose_flavor">Choose Flavor</string>
<string name="vanilla">Vanilla</string>
<string name="chocolate">Chocolate</string>
<string name="red_velvet">Red Velvet</string>
<string name="salted_caramel">Salted Caramel</string>
<string name="coffee">Coffee</string>
<string name="puttanesca">puttanesca</string>
<string name="bolognese">bolognese</string>
<string name="carbonara">carbonara</string>
<string name="alfredo">alfredo</string>
<string name="amatriciana">amatriciana</string>
<string name="special_flavor">Special Flavor</string>
<string name="cancel">Cancel</string>
<string name="next">Next</string>
@ -39,8 +39,8 @@
<string name="new_spagheti_order">New Spagheti Order</string>
<string name="order_details">Quantity: %1$s \nFlavor: %2$s \nPickup date: %3$s \nTotal: %4$s \n\nThank you!</string>
<string name="back_button">Back</string>
<plurals name="cupcakes">
<item quantity="one">%d cupcake</item>
<item quantity="other">%d cupcakes</item>
<plurals name="spaghetti">
<item quantity="one">%d spaghetti</item>
<item quantity="other">%d spaghetti</item>
</plurals>
</resources>