Compare commits
10 Commits
fa202ff162
...
4ffff4c7ad
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ffff4c7ad | ||
|
|
82b7dc7723 | ||
|
|
8b50e72975 | ||
|
|
7097a75f37 | ||
|
|
a5118e6dfe | ||
|
|
8f9aedaebc | ||
|
|
5b8dab87ee | ||
|
|
1c31d367a1 | ||
|
|
14f13dd912 | ||
|
|
94e3827d7c |
6
.github/renovate.json
vendored
Normal file
6
.github/renovate.json
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": [
|
||||||
|
"local>android/.github:renovate-config"
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -5,15 +5,12 @@ This app contains an order flow for cupcakes with options for quantity, flavor,
|
|||||||
The order details get displayed on an order summary screen and can be shared to another app to
|
The order details get displayed on an order summary screen and can be shared to another app to
|
||||||
send the order.
|
send the order.
|
||||||
|
|
||||||
TODO
|
|
||||||
|
|
||||||
|
|
||||||
Pre-requisites
|
Pre-requisites
|
||||||
--------------
|
--------------
|
||||||
* Experience with Kotlin syntax.
|
* Experience with Kotlin syntax.
|
||||||
* How to create and run a project in Android Studio.
|
* How to create and run a project in Android Studio.
|
||||||
* How to create composable functions
|
* How to create composable functions
|
||||||
* TODO
|
|
||||||
|
|
||||||
|
|
||||||
Getting Started
|
Getting Started
|
||||||
|
|||||||
@ -20,12 +20,12 @@ plugins {
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "com.example.cupcake"
|
namespace = "com.example.cupcake"
|
||||||
compileSdk = 33
|
compileSdk = 34
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "com.example.cupcake"
|
applicationId = "com.example.cupcake"
|
||||||
minSdk = 24
|
minSdk = 24
|
||||||
targetSdk = 33
|
targetSdk = 34
|
||||||
versionCode = 1
|
versionCode = 1
|
||||||
versionName = "1.0"
|
versionName = "1.0"
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ android {
|
|||||||
compose = true
|
compose = true
|
||||||
}
|
}
|
||||||
composeOptions {
|
composeOptions {
|
||||||
kotlinCompilerExtensionVersion = "1.4.7"
|
kotlinCompilerExtensionVersion = "1.5.3"
|
||||||
}
|
}
|
||||||
packaging {
|
packaging {
|
||||||
resources {
|
resources {
|
||||||
@ -67,24 +67,24 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
implementation(platform("androidx.compose:compose-bom:2023.05.01"))
|
implementation(platform("androidx.compose:compose-bom:2023.10.01"))
|
||||||
implementation("androidx.activity:activity-compose:1.7.2")
|
implementation("androidx.activity:activity-compose:1.8.0")
|
||||||
implementation("androidx.compose.material3:material3")
|
implementation("androidx.compose.material3:material3")
|
||||||
implementation("androidx.compose.runtime:runtime")
|
implementation("androidx.compose.runtime:runtime")
|
||||||
implementation("androidx.compose.runtime:runtime-livedata")
|
implementation("androidx.compose.runtime:runtime-livedata")
|
||||||
implementation("androidx.compose.ui:ui")
|
implementation("androidx.compose.ui:ui")
|
||||||
implementation("androidx.compose.ui:ui-graphics")
|
implementation("androidx.compose.ui:ui-graphics")
|
||||||
implementation("androidx.compose.ui:ui-tooling-preview")
|
implementation("androidx.compose.ui:ui-tooling-preview")
|
||||||
implementation("androidx.core:core-ktx:1.10.1")
|
implementation("androidx.core:core-ktx:1.12.0")
|
||||||
implementation("androidx.lifecycle:lifecycle-livedata-ktx:${rootProject.extra["lifecycle_version"]}")
|
implementation("androidx.lifecycle:lifecycle-livedata-ktx:${rootProject.extra["lifecycle_version"]}")
|
||||||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:${rootProject.extra["lifecycle_version"]}")
|
implementation("androidx.lifecycle:lifecycle-runtime-ktx:${rootProject.extra["lifecycle_version"]}")
|
||||||
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:${rootProject.extra["lifecycle_version"]}")
|
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:${rootProject.extra["lifecycle_version"]}")
|
||||||
implementation("androidx.lifecycle:lifecycle-viewmodel-savedstate:${rootProject.extra["lifecycle_version"]}")
|
implementation("androidx.lifecycle:lifecycle-viewmodel-savedstate:${rootProject.extra["lifecycle_version"]}")
|
||||||
implementation("androidx.navigation:navigation-compose:2.5.3")
|
implementation("androidx.navigation:navigation-compose:2.7.4")
|
||||||
|
|
||||||
androidTestImplementation(platform("androidx.compose:compose-bom:2023.05.01"))
|
androidTestImplementation(platform("androidx.compose:compose-bom:2023.10.01"))
|
||||||
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
|
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
|
||||||
androidTestImplementation("androidx.navigation:navigation-testing:2.5.3")
|
androidTestImplementation("androidx.navigation:navigation-testing:2.7.4")
|
||||||
androidTestImplementation("androidx.test.espresso:espresso-intents:3.5.1")
|
androidTestImplementation("androidx.test.espresso:espresso-intents:3.5.1")
|
||||||
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
||||||
|
|
||||||
|
|||||||
@ -76,25 +76,25 @@ class CupcakeOrderScreenTest {
|
|||||||
@Test
|
@Test
|
||||||
fun selectOptionScreen_verifyContent() {
|
fun selectOptionScreen_verifyContent() {
|
||||||
// Given list of options
|
// Given list of options
|
||||||
val flavours = listOf("Vanilla", "Chocolate", "Hazelnut", "Cookie", "Mango")
|
val flavors = listOf("Vanilla", "Chocolate", "Hazelnut", "Cookie", "Mango")
|
||||||
// And subtotal
|
// And subtotal
|
||||||
val subTotal = "$100"
|
val subtotal = "$100"
|
||||||
|
|
||||||
// When SelectOptionScreen is loaded
|
// When SelectOptionScreen is loaded
|
||||||
composeTestRule.setContent {
|
composeTestRule.setContent {
|
||||||
SelectOptionScreen(subtotal = subTotal, options = flavours)
|
SelectOptionScreen(subtotal = subtotal, options = flavors)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Then all the options are displayed on the screen.
|
// Then all the options are displayed on the screen.
|
||||||
flavours.forEach { flavour ->
|
flavors.forEach { flavor ->
|
||||||
composeTestRule.onNodeWithText(flavour).assertIsDisplayed()
|
composeTestRule.onNodeWithText(flavor).assertIsDisplayed()
|
||||||
}
|
}
|
||||||
|
|
||||||
// And then the subtotal is displayed correctly.
|
// And then the subtotal is displayed correctly.
|
||||||
composeTestRule.onNodeWithText(
|
composeTestRule.onNodeWithText(
|
||||||
composeTestRule.activity.getString(
|
composeTestRule.activity.getString(
|
||||||
R.string.subtotal_price,
|
R.string.subtotal_price,
|
||||||
subTotal
|
subtotal
|
||||||
)
|
)
|
||||||
).assertIsDisplayed()
|
).assertIsDisplayed()
|
||||||
|
|
||||||
@ -148,6 +148,6 @@ class CupcakeOrderScreenTest {
|
|||||||
R.string.subtotal_price,
|
R.string.subtotal_price,
|
||||||
fakeOrderUiState.price
|
fakeOrderUiState.price
|
||||||
)
|
)
|
||||||
)
|
).assertIsDisplayed()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,6 +21,8 @@ import androidx.annotation.StringRes
|
|||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.rememberScrollState
|
||||||
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.ArrowBack
|
import androidx.compose.material.icons.filled.ArrowBack
|
||||||
import androidx.compose.material3.Icon
|
import androidx.compose.material3.Icon
|
||||||
@ -115,7 +117,10 @@ fun CupcakeApp(
|
|||||||
NavHost(
|
NavHost(
|
||||||
navController = navController,
|
navController = navController,
|
||||||
startDestination = CupcakeScreen.Start.name,
|
startDestination = CupcakeScreen.Start.name,
|
||||||
modifier = Modifier.padding(innerPadding)
|
modifier = Modifier
|
||||||
|
.fillMaxSize()
|
||||||
|
.verticalScroll(rememberScrollState())
|
||||||
|
.padding(innerPadding)
|
||||||
) {
|
) {
|
||||||
composable(route = CupcakeScreen.Start.name) {
|
composable(route = CupcakeScreen.Start.name) {
|
||||||
StartOrderScreen(
|
StartOrderScreen(
|
||||||
@ -195,7 +200,7 @@ private fun shareOrder(context: Context, subject: String, summary: String) {
|
|||||||
context.startActivity(
|
context.startActivity(
|
||||||
Intent.createChooser(
|
Intent.createChooser(
|
||||||
intent,
|
intent,
|
||||||
context.getString(R.string.new_cupcake_order)
|
context.getString(R.string.new_softdrinks_order)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,13 +18,13 @@ package com.example.cupcake
|
|||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.activity.ComponentActivity
|
import androidx.activity.ComponentActivity
|
||||||
import androidx.activity.compose.setContent
|
import androidx.activity.compose.setContent
|
||||||
import androidx.core.view.WindowCompat
|
import androidx.activity.enableEdgeToEdge
|
||||||
import com.example.cupcake.ui.theme.CupcakeTheme
|
import com.example.cupcake.ui.theme.CupcakeTheme
|
||||||
|
|
||||||
class MainActivity : ComponentActivity() {
|
class MainActivity : ComponentActivity() {
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
enableEdgeToEdge()
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
WindowCompat.setDecorFitsSystemWindows(window, false)
|
|
||||||
setContent {
|
setContent {
|
||||||
CupcakeTheme {
|
CupcakeTheme {
|
||||||
CupcakeApp()
|
CupcakeApp()
|
||||||
|
|||||||
@ -19,16 +19,16 @@ import com.example.cupcake.R
|
|||||||
|
|
||||||
object DataSource {
|
object DataSource {
|
||||||
val flavors = listOf(
|
val flavors = listOf(
|
||||||
R.string.vanilla,
|
R.string.coca_cola,
|
||||||
R.string.chocolate,
|
R.string.fanta,
|
||||||
R.string.red_velvet,
|
R.string.pepsi,
|
||||||
R.string.salted_caramel,
|
R.string.sprite,
|
||||||
R.string.coffee
|
R.string.ice_coffee
|
||||||
)
|
)
|
||||||
|
|
||||||
val quantityOptions = listOf(
|
val quantityOptions = listOf(
|
||||||
Pair(R.string.one_cupcake, 1),
|
Pair(R.string.one_bottle, 1),
|
||||||
Pair(R.string.six_cupcakes, 6),
|
Pair(R.string.six_bottle, 6),
|
||||||
Pair(R.string.twelve_cupcakes, 12)
|
Pair(R.string.twelve_bottle, 12)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,6 +39,7 @@ import androidx.compose.ui.res.stringResource
|
|||||||
import androidx.compose.ui.tooling.preview.Preview
|
import androidx.compose.ui.tooling.preview.Preview
|
||||||
import com.example.cupcake.R
|
import com.example.cupcake.R
|
||||||
import com.example.cupcake.ui.components.FormattedPriceLabel
|
import com.example.cupcake.ui.components.FormattedPriceLabel
|
||||||
|
import com.example.cupcake.ui.theme.CupcakeTheme
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Composable that displays the list of items as [RadioButton] options,
|
* Composable that displays the list of items as [RadioButton] options,
|
||||||
@ -100,12 +101,14 @@ fun SelectOptionScreen(
|
|||||||
Row(
|
Row(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(dimensionResource(R.dimen.padding_medium))
|
.padding(dimensionResource(R.dimen.padding_medium)),
|
||||||
.weight(1f, false),
|
|
||||||
horizontalArrangement = Arrangement.spacedBy(dimensionResource(R.dimen.padding_medium)),
|
horizontalArrangement = Arrangement.spacedBy(dimensionResource(R.dimen.padding_medium)),
|
||||||
verticalAlignment = Alignment.Bottom
|
verticalAlignment = Alignment.Bottom
|
||||||
) {
|
) {
|
||||||
OutlinedButton(modifier = Modifier.weight(1f), onClick = onCancelButtonClicked) {
|
OutlinedButton(
|
||||||
|
modifier = Modifier.weight(1f),
|
||||||
|
onClick = onCancelButtonClicked
|
||||||
|
) {
|
||||||
Text(stringResource(R.string.cancel))
|
Text(stringResource(R.string.cancel))
|
||||||
}
|
}
|
||||||
Button(
|
Button(
|
||||||
@ -124,9 +127,11 @@ fun SelectOptionScreen(
|
|||||||
@Preview
|
@Preview
|
||||||
@Composable
|
@Composable
|
||||||
fun SelectOptionPreview() {
|
fun SelectOptionPreview() {
|
||||||
|
CupcakeTheme {
|
||||||
SelectOptionScreen(
|
SelectOptionScreen(
|
||||||
subtotal = "299.99",
|
subtotal = "299.99",
|
||||||
options = listOf("Option 1", "Option 2", "Option 3", "Option 4"),
|
options = listOf("Option 1", "Option 2", "Option 3", "Option 4"),
|
||||||
modifier = Modifier.fillMaxHeight()
|
modifier = Modifier.fillMaxHeight()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -19,9 +19,7 @@ import androidx.annotation.StringRes
|
|||||||
import androidx.compose.foundation.Image
|
import androidx.compose.foundation.Image
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Row
|
|
||||||
import androidx.compose.foundation.layout.Spacer
|
import androidx.compose.foundation.layout.Spacer
|
||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
@ -41,6 +39,7 @@ import androidx.compose.ui.tooling.preview.Preview
|
|||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import com.example.cupcake.R
|
import com.example.cupcake.R
|
||||||
import com.example.cupcake.data.DataSource
|
import com.example.cupcake.data.DataSource
|
||||||
|
import com.example.cupcake.ui.theme.CupcakeTheme
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Composable that allows the user to select the desired cupcake quantity and expects
|
* Composable that allows the user to select the desired cupcake quantity and expects
|
||||||
@ -64,18 +63,17 @@ fun StartOrderScreen(
|
|||||||
) {
|
) {
|
||||||
Spacer(modifier = Modifier.height(dimensionResource(R.dimen.padding_medium)))
|
Spacer(modifier = Modifier.height(dimensionResource(R.dimen.padding_medium)))
|
||||||
Image(
|
Image(
|
||||||
painter = painterResource(R.drawable.cupcake),
|
painter = painterResource(R.drawable.softdrink1),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
modifier = Modifier.width(300.dp)
|
modifier = Modifier.width(300.dp)
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(dimensionResource(R.dimen.padding_medium)))
|
Spacer(modifier = Modifier.height(dimensionResource(R.dimen.padding_medium)))
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.order_cupcakes),
|
text = stringResource(R.string.order_SoftDrinks),
|
||||||
style = MaterialTheme.typography.headlineSmall
|
style = MaterialTheme.typography.headlineSmall
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(dimensionResource(R.dimen.padding_small)))
|
Spacer(modifier = Modifier.height(dimensionResource(R.dimen.padding_small)))
|
||||||
}
|
}
|
||||||
Row(modifier = Modifier.weight(1f, false)) {
|
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
@ -86,13 +84,13 @@ fun StartOrderScreen(
|
|||||||
quantityOptions.forEach { item ->
|
quantityOptions.forEach { item ->
|
||||||
SelectQuantityButton(
|
SelectQuantityButton(
|
||||||
labelResourceId = item.first,
|
labelResourceId = item.first,
|
||||||
onClick = { onNextButtonClicked(item.second) }
|
onClick = { onNextButtonClicked(item.second) },
|
||||||
|
modifier = Modifier.fillMaxWidth(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Customizable button composable that displays the [labelResourceId]
|
* Customizable button composable that displays the [labelResourceId]
|
||||||
@ -115,9 +113,13 @@ fun SelectQuantityButton(
|
|||||||
@Preview
|
@Preview
|
||||||
@Composable
|
@Composable
|
||||||
fun StartOrderPreview() {
|
fun StartOrderPreview() {
|
||||||
|
CupcakeTheme {
|
||||||
StartOrderScreen(
|
StartOrderScreen(
|
||||||
quantityOptions = DataSource.quantityOptions,
|
quantityOptions = DataSource.quantityOptions,
|
||||||
onNextButtonClicked = {},
|
onNextButtonClicked = {},
|
||||||
modifier = Modifier.fillMaxSize().padding(dimensionResource(R.dimen.padding_medium))
|
modifier = Modifier
|
||||||
|
.fillMaxSize()
|
||||||
|
.padding(dimensionResource(R.dimen.padding_medium))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -38,6 +38,7 @@ import androidx.compose.ui.tooling.preview.Preview
|
|||||||
import com.example.cupcake.R
|
import com.example.cupcake.R
|
||||||
import com.example.cupcake.data.OrderUiState
|
import com.example.cupcake.data.OrderUiState
|
||||||
import com.example.cupcake.ui.components.FormattedPriceLabel
|
import com.example.cupcake.ui.components.FormattedPriceLabel
|
||||||
|
import com.example.cupcake.ui.theme.CupcakeTheme
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This composable expects [orderUiState] that represents the order state, [onCancelButtonClicked]
|
* This composable expects [orderUiState] that represents the order state, [onCancelButtonClicked]
|
||||||
@ -66,7 +67,7 @@ fun OrderSummaryScreen(
|
|||||||
orderUiState.date,
|
orderUiState.date,
|
||||||
orderUiState.quantity
|
orderUiState.quantity
|
||||||
)
|
)
|
||||||
val newOrder = stringResource(R.string.new_cupcake_order)
|
val newOrder = stringResource(R.string.new_softdrinks_order)
|
||||||
//Create a list of order summary to display
|
//Create a list of order summary to display
|
||||||
val items = listOf(
|
val items = listOf(
|
||||||
// Summary line 1: display selected quantity
|
// Summary line 1: display selected quantity
|
||||||
@ -97,9 +98,7 @@ fun OrderSummaryScreen(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier
|
modifier = Modifier.padding(dimensionResource(R.dimen.padding_medium))
|
||||||
.weight(1f, false)
|
|
||||||
.padding(dimensionResource(R.dimen.padding_medium))
|
|
||||||
) {
|
) {
|
||||||
Column(
|
Column(
|
||||||
verticalArrangement = Arrangement.spacedBy(dimensionResource(R.dimen.padding_small))
|
verticalArrangement = Arrangement.spacedBy(dimensionResource(R.dimen.padding_small))
|
||||||
@ -124,6 +123,7 @@ fun OrderSummaryScreen(
|
|||||||
@Preview
|
@Preview
|
||||||
@Composable
|
@Composable
|
||||||
fun OrderSummaryPreview() {
|
fun OrderSummaryPreview() {
|
||||||
|
CupcakeTheme {
|
||||||
OrderSummaryScreen(
|
OrderSummaryScreen(
|
||||||
orderUiState = OrderUiState(0, "Test", "Test", "$300.00"),
|
orderUiState = OrderUiState(0, "Test", "Test", "$300.00"),
|
||||||
onSendButtonClicked = { subject: String, summary: String -> },
|
onSendButtonClicked = { subject: String, summary: String -> },
|
||||||
@ -131,3 +131,4 @@ fun OrderSummaryPreview(){
|
|||||||
modifier = Modifier.fillMaxHeight()
|
modifier = Modifier.fillMaxHeight()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
9
app/src/main/res/drawable/softdrink1.xml
Normal file
9
app/src/main/res/drawable/softdrink1.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="800dp"
|
||||||
|
android:height="800dp"
|
||||||
|
android:viewportWidth="444.66"
|
||||||
|
android:viewportHeight="444.66">
|
||||||
|
<path
|
||||||
|
android:pathData="M235.73,163.14c-2.74,2.72 -7.18,2.71 -9.9,-0.04c-15.09,-15.2 -35.19,-23.58 -56.6,-23.58c-43.97,0 -79.75,35.77 -79.75,79.74c0,43.97 35.77,79.75 79.75,79.75c21.41,0 41.52,-8.37 56.6,-23.58c2.72,-2.74 7.15,-2.76 9.9,-0.04c2.74,2.72 2.76,7.16 0.04,9.9c-17.74,17.88 -41.37,27.72 -66.54,27.72c-51.69,0 -93.75,-42.05 -93.75,-93.75c0,-51.69 42.05,-93.74 93.75,-93.74c25.17,0 48.81,9.84 66.54,27.72C238.49,155.98 238.47,160.41 235.73,163.14zM383.62,410.6c0,18.78 -15.28,34.05 -34.06,34.05c-10.79,0 -20.73,-5.17 -27.06,-13.42c-6.32,8.25 -16.26,13.42 -27.05,13.42c-18.78,0 -34.06,-15.28 -34.06,-34.05V274.62c0,-3.25 2.24,-6.07 5.4,-6.81c8.98,-2.11 15.5,-10.32 15.5,-19.52c0,-9.16 -6.46,-17.35 -15.38,-19.5c-0.91,-0.2 -1.75,-0.57 -2.49,-1.08c-0,-0 -0.01,-0 -0.01,-0.01c-0,0 -0,-0 -0,-0c-0.44,-0.3 -0.84,-0.65 -1.19,-1.04c-1.11,-1.22 -1.8,-2.84 -1.82,-4.62v-0c0,0 0,-0.01 -0,-0.01v-0.01v-0.01v-0.01v-0.01v-0.01c0,-0 0,-0 0,-0c0,-0.01 0,-0.02 0,-0.02v-46.56c0,-17.95 11.24,-33.33 27.06,-39.47v-33.79c0,-3.87 3.13,-7 7,-7h54.11c3.87,0 7,3.13 7,7v33.79c15.81,6.14 27.06,21.52 27.06,39.47v46.56c0,3.25 -2.23,6.07 -5.4,6.81c-8.98,2.11 -15.5,10.32 -15.5,19.53s6.52,17.42 15.5,19.53c3.16,0.74 5.4,3.57 5.4,6.81v16.88c0,3.87 -3.13,7 -7,7s-7,-3.13 -7,-7v-11.83c-12.38,-5.26 -20.9,-17.67 -20.9,-31.39c0,-13.72 8.52,-26.14 20.9,-31.39v-41.51c0,-15.61 -12.7,-28.32 -28.32,-28.32h-37.58c-15.62,0 -28.32,12.7 -28.32,28.32v39.56h54.16c3.87,0 7,3.13 7,7s-3.13,7 -7,7h-39.39c3.88,5.57 6.13,12.28 6.13,19.34c0,13.72 -8.52,26.14 -20.9,31.39v34.56h70.19c3.87,0 7,3.13 7,7s-3.13,7 -7,7h-70.19v82.38c0,11.06 9,20.05 20.06,20.05c8.94,0 16.88,-6.03 19.31,-14.66c0.85,-3.02 3.6,-5.1 6.74,-5.1h2.01c3.13,0 5.89,2.08 6.74,5.1c2.43,8.63 10.37,14.66 19.31,14.66c11.06,0 20.06,-8.99 20.06,-20.05c0,-3.87 3.13,-7 7,-7S383.62,406.74 383.62,410.6zM302.45,133.08c0.42,-0.01 0.84,-0.02 1.27,-0.02h37.58c0.42,0 0.85,0.01 1.26,0.02v-23.96h-13.05v5.04c0,3.87 -3.13,7 -7,7s-7,-3.13 -7,-7v-5.04h-13.06V133.08zM243.19,396.1c0,3.87 -3.13,7 -7,7H42.92c-3.87,0 -7,-3.13 -7,-7V42.43c0,-3.87 3.13,-7 7,-7h43.52V7c0,-3.87 3.13,-7 7,-7h50.52c3.87,0 7,3.13 7,7v28.43h144.57c3.87,0 7,3.13 7,7v26.82c0,3.87 -3.13,7 -7,7s-7,-3.13 -7,-7V49.43H49.92v339.66h186.27C240.05,389.1 243.19,392.23 243.19,396.1zM100.44,35.43h36.52V14H125.7v4.24c0,3.87 -3.13,7 -7,7s-7,-3.13 -7,-7V14h-11.26V35.43zM170.18,212.26h-1.91c-3.87,0 -7,3.13 -7,7s3.13,7 7,7h1.91c3.87,0 7,-3.13 7,-7S174.05,212.26 170.18,212.26zM346.46,207.56c3.87,0 7,-3.13 7,-7v-18.79c0,-11.72 -9.54,-21.26 -21.26,-21.26c-3.87,0 -7,3.13 -7,7s3.13,7 7,7c4,0 7.26,3.26 7.26,7.26v18.79C339.46,204.42 342.59,207.56 346.46,207.56zM405.35,372.24c-5.55,10.84 -16.56,17.58 -28.73,17.58c-11.66,0 -22.45,-6.32 -28.16,-16.5c-10.64,-18.98 2.01,-33.66 13.16,-46.62c3.21,-3.73 6.53,-7.58 9.27,-11.47c1.31,-1.85 3.44,-2.96 5.72,-2.96s4.4,1.1 5.72,2.96c2.75,3.89 6.06,7.73 9.27,11.45C402.5,339.32 414.85,353.67 405.35,372.24zM380.99,335.81c-1.45,-1.68 -2.92,-3.39 -4.37,-5.14c-1.46,1.75 -2.93,3.46 -4.38,5.15c-11.12,12.91 -17.13,20.7 -11.56,30.64c3.23,5.77 9.34,9.35 15.94,9.35c6.89,0 13.13,-3.81 16.27,-9.95C397.86,356.14 391.92,348.49 380.99,335.81zM225.26,187.41c5.36,9.4 8.43,20.28 8.43,31.85s-3.07,22.45 -8.43,31.85c-0.06,0.13 -0.13,0.25 -0.2,0.38c-0.08,0.13 -0.16,0.26 -0.24,0.39c-11.22,19.04 -31.93,31.84 -55.59,31.84c-23.65,0 -44.37,-12.8 -55.58,-31.84c-0.09,-0.13 -0.17,-0.26 -0.25,-0.4c-0.07,-0.13 -0.14,-0.26 -0.21,-0.39c-5.36,-9.4 -8.43,-20.27 -8.43,-31.85s3.07,-22.45 8.43,-31.85c0.06,-0.13 0.13,-0.26 0.21,-0.39c0.08,-0.14 0.16,-0.27 0.25,-0.4c11.22,-19.03 31.93,-31.84 55.58,-31.84c23.65,0 44.37,12.8 55.59,31.84c0.08,0.13 0.16,0.26 0.24,0.39C225.13,187.15 225.19,187.28 225.26,187.41zM219.69,219.26c0,-6.69 -1.31,-13.08 -3.68,-18.93l-23.37,13.49c-3.35,1.93 -7.63,0.79 -9.56,-2.56c-1.93,-3.35 -0.79,-7.63 2.56,-9.56l23.35,-13.48c-7.88,-10.08 -19.51,-17.09 -32.76,-18.94v27c0,3.87 -3.13,7 -7,7c-3.87,0 -7,-3.13 -7,-7v-27c-13.26,1.85 -24.88,8.86 -32.76,18.94l23.35,13.48c3.35,1.93 4.49,6.22 2.56,9.56c-1.93,3.35 -6.22,4.49 -9.56,2.56l-23.37,-13.49c-2.38,5.85 -3.68,12.24 -3.68,18.93s1.31,13.08 3.68,18.93l23.37,-13.49c3.35,-1.93 7.63,-0.79 9.56,2.56c1.93,3.35 0.79,7.63 -2.56,9.56l-23.35,13.48c7.88,10.08 19.51,17.09 32.76,18.94v-27c0,-3.87 3.13,-7 7,-7c3.87,0 7,3.13 7,7v27c13.26,-1.85 24.88,-8.86 32.76,-18.94l-23.35,-13.48c-3.35,-1.93 -4.49,-6.22 -2.56,-9.56c1.93,-3.35 6.21,-4.49 9.56,-2.56l23.37,13.49C218.38,232.34 219.69,225.95 219.69,219.26z"
|
||||||
|
android:fillColor="#000000"/>
|
||||||
|
</vector>
|
||||||
422
app/src/main/res/drawable/softdrinks.xml
Normal file
422
app/src/main/res/drawable/softdrinks.xml
Normal file
File diff suppressed because one or more lines are too long
@ -14,17 +14,17 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">Cupcake</string>
|
<string name="app_name">SoftDrinks App</string>
|
||||||
<string name="order_cupcakes">Order Cupcakes</string>
|
<string name="order_SoftDrinks">Order Softdrinks</string>
|
||||||
<string name="one_cupcake">One Cupcake</string>
|
<string name="one_bottle">One Bottle</string>
|
||||||
<string name="six_cupcakes">Six Cupcakes</string>
|
<string name="six_bottle">Six Bottle</string>
|
||||||
<string name="twelve_cupcakes">Twelve Cupcakes</string>
|
<string name="twelve_bottle">Twelve Bottle</string>
|
||||||
<string name="choose_flavor">Choose Flavor</string>
|
<string name="choose_flavor">Choose Flavor</string>
|
||||||
<string name="vanilla">Vanilla</string>
|
<string name="coca_cola">coca cola</string>
|
||||||
<string name="chocolate">Chocolate</string>
|
<string name="sprite">sprite</string>
|
||||||
<string name="red_velvet">Red Velvet</string>
|
<string name="fanta">fanta</string>
|
||||||
<string name="salted_caramel">Salted Caramel</string>
|
<string name="pepsi">pepsi</string>
|
||||||
<string name="coffee">Coffee</string>
|
<string name="ice_coffee">Ice Coffee</string>
|
||||||
<string name="special_flavor">Special Flavor</string>
|
<string name="special_flavor">Special Flavor</string>
|
||||||
<string name="cancel">Cancel</string>
|
<string name="cancel">Cancel</string>
|
||||||
<string name="next">Next</string>
|
<string name="next">Next</string>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<string name="pickup_date">Pickup date</string>
|
<string name="pickup_date">Pickup date</string>
|
||||||
<string name="subtotal_price">Subtotal %s</string>
|
<string name="subtotal_price">Subtotal %s</string>
|
||||||
<string name="total_price">Total %s</string>
|
<string name="total_price">Total %s</string>
|
||||||
<string name="new_cupcake_order">New Cupcake Order</string>
|
<string name="new_softdrinks_order">New SoftDrinks 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="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>
|
<string name="back_button">Back</string>
|
||||||
<plurals name="cupcakes">
|
<plurals name="cupcakes">
|
||||||
|
|||||||
@ -16,11 +16,11 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
buildscript {
|
buildscript {
|
||||||
extra.apply {
|
extra.apply {
|
||||||
set("lifecycle_version", "2.6.1")
|
set("lifecycle_version", "2.6.2")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application") version "8.0.2" apply false
|
id("com.android.application") version "8.1.2" apply false
|
||||||
id("com.android.library") version "8.0.2" apply false
|
id("com.android.library") version "8.1.2" apply false
|
||||||
id("org.jetbrains.kotlin.android") version "1.8.21" apply false
|
id("org.jetbrains.kotlin.android") version "1.9.10" apply false
|
||||||
}
|
}
|
||||||
|
|||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
|||||||
#Sun Mar 19 17:30:22 PDT 2023
|
#Sun Mar 19 17:30:22 PDT 2023
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user