Added app icon
Started work on the freezer overview Updated dependencies Some project restructuring
1
.idea/gradle.xml
generated
@@ -7,6 +7,7 @@
|
||||
<option name="testRunner" value="GRADLE" />
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleJvm" value="Embedded JDK" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
|
||||
@@ -5,12 +5,12 @@ plugins {
|
||||
|
||||
android {
|
||||
namespace 'com.mitchelbv.thuis_c'
|
||||
compileSdk 32
|
||||
compileSdk 33
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.mitchelbv.thuis_c"
|
||||
minSdk 30
|
||||
targetSdk 32
|
||||
targetSdk 33
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
@@ -37,7 +37,7 @@ android {
|
||||
compose true
|
||||
}
|
||||
composeOptions {
|
||||
kotlinCompilerExtensionVersion '1.1.1'
|
||||
kotlinCompilerExtensionVersion '1.3.2'
|
||||
}
|
||||
packagingOptions {
|
||||
resources {
|
||||
@@ -49,31 +49,31 @@ android {
|
||||
dependencies {
|
||||
//Network
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
||||
implementation 'com.google.code.gson:gson:2.9.0'
|
||||
implementation 'com.google.code.gson:gson:2.9.1'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
||||
|
||||
// Display images from the internet
|
||||
implementation "io.coil-kt:coil-compose:2.2.2"
|
||||
|
||||
// Database
|
||||
implementation "androidx.room:room-runtime:2.4.3"
|
||||
annotationProcessor("androidx.room:room-compiler:2.4.3")
|
||||
implementation "androidx.room:room-runtime:2.5.0"
|
||||
annotationProcessor("androidx.room:room-compiler:2.5.0")
|
||||
|
||||
// Navigation
|
||||
implementation "androidx.navigation:navigation-compose:2.5.3"
|
||||
|
||||
// ViewModel
|
||||
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha07"
|
||||
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.5.1"
|
||||
|
||||
implementation 'androidx.core:core-ktx:1.7.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
|
||||
implementation 'androidx.activity:activity-compose:1.3.1'
|
||||
implementation 'androidx.core:core-ktx:1.9.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
|
||||
implementation 'androidx.activity:activity-compose:1.6.1'
|
||||
implementation "androidx.compose.ui:ui:$compose_version"
|
||||
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
|
||||
implementation 'androidx.compose.material3:material3:1.0.0-alpha02'
|
||||
implementation 'androidx.compose.material3:material3:1.0.1'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
||||
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
|
||||
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
|
||||
debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version"
|
||||
|
||||
BIN
app/src/debug/ic_launcher-playstore.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
app/src/main/ic_launcher-playstore.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
@@ -3,18 +3,12 @@ package com.mitchelbv.thuis_c
|
||||
import android.os.Bundle
|
||||
import androidx.activity.ComponentActivity
|
||||
import androidx.activity.compose.setContent
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.DateRange
|
||||
import androidx.compose.material.icons.filled.Home
|
||||
import androidx.compose.material.icons.filled.List
|
||||
import androidx.compose.material3.*
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.navigation.NavDestination.Companion.hierarchy
|
||||
import androidx.navigation.NavGraph.Companion.findStartDestination
|
||||
@@ -22,7 +16,10 @@ import androidx.navigation.compose.NavHost
|
||||
import androidx.navigation.compose.composable
|
||||
import androidx.navigation.compose.currentBackStackEntryAsState
|
||||
import androidx.navigation.compose.rememberNavController
|
||||
import com.mitchelbv.thuis_c.ui.card.CardsScreen
|
||||
import com.mitchelbv.thuis_c.ui.feyenoord.FeyenoordScreen
|
||||
import com.mitchelbv.thuis_c.ui.freezer.FreezerScreen
|
||||
import com.mitchelbv.thuis_c.ui.freezer.detailed.FreezerDetailedScreen
|
||||
import com.mitchelbv.thuis_c.ui.home.HomeScreen
|
||||
import com.mitchelbv.thuis_c.ui.recipe.RecipeScreen
|
||||
import com.mitchelbv.thuis_c.ui.theme.ThuisTheme
|
||||
@@ -44,12 +41,6 @@ class MainActivity : ComponentActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
sealed class Screen(val route: String, @StringRes val resourceId: Int, val icon: ImageVector) {
|
||||
object Feyenoord : Screen("feyenoord", R.string.nav_feyenoord, Icons.Default.DateRange)
|
||||
object Recipes : Screen("recipes", R.string.nav_recipes, Icons.Default.List)
|
||||
object Home : Screen("home", R.string.nav_home, Icons.Default.Home)
|
||||
}
|
||||
|
||||
val screenItems = listOf(
|
||||
Screen.Home,
|
||||
Screen.Recipes,
|
||||
@@ -60,13 +51,13 @@ val screenItems = listOf(
|
||||
@Composable
|
||||
fun ThuisApp() {
|
||||
val navController = rememberNavController()
|
||||
val navBackStackEntry by navController.currentBackStackEntryAsState()
|
||||
Scaffold(
|
||||
topBar = {
|
||||
SmallTopAppBar(title = { Text(stringResource(id = R.string.app_name))})
|
||||
TopAppBar(title = { Text(stringResource(id = R.string.app_name))})
|
||||
},
|
||||
bottomBar = {
|
||||
NavigationBar {
|
||||
val navBackStackEntry by navController.currentBackStackEntryAsState()
|
||||
val currentDestination = navBackStackEntry?.destination
|
||||
screenItems.forEach { screen ->
|
||||
NavigationBarItem(
|
||||
@@ -90,6 +81,10 @@ fun ThuisApp() {
|
||||
composable("home") { HomeScreen(navController) }
|
||||
composable("feyenoord") { FeyenoordScreen(navHostController = navController) }
|
||||
composable("recipes") { RecipeScreen(navHostController = navController)}
|
||||
composable("freezer") {FreezerScreen(navHostController = navController)}
|
||||
composable("cards") { CardsScreen(navHostController = navController) }
|
||||
composable("freezer-details/{freezerId}") { backStackEntry -> FreezerDetailedScreen(navHostController = navController, freezerId = backStackEntry.arguments?.getString("freezerId")) }
|
||||
composable("freezer-edit") { CardsScreen(navHostController = navController) }
|
||||
}
|
||||
}
|
||||
}
|
||||
17
app/src/main/java/com/mitchelbv/thuis_c/Screens.kt
Normal file
@@ -0,0 +1,17 @@
|
||||
package com.mitchelbv.thuis_c
|
||||
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.*
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.navigation.NavArgs
|
||||
|
||||
sealed class Screen(val route: String, @StringRes val resourceId: Int, val icon: ImageVector) {
|
||||
object Feyenoord : Screen("feyenoord", R.string.nav_feyenoord, Icons.Default.DateRange)
|
||||
object Recipes : Screen("recipes", R.string.nav_recipes, Icons.Default.List)
|
||||
object Home : Screen("home", R.string.nav_home, Icons.Default.Home)
|
||||
object Cards : Screen("cards", R.string.home_card_cards, Icons.Default.Call)
|
||||
object Freezer : Screen("freezer", R.string.home_card_freezer, Icons.Default.DateRange)
|
||||
object FreezerDetails : Screen("freezer-details", R.string.home_card_freezer, Icons.Default.ShoppingCart)
|
||||
object FreezerEdit : Screen("freezer-edit", R.string.edit_freezer, Icons.Default.Call)
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.mitchelbv.thuis_c.network.card
|
||||
|
||||
import com.mitchelbv.thuis_c.network.feyenoord.FeyenoordRetrofitHelper
|
||||
import retrofit2.Retrofit
|
||||
import retrofit2.converter.gson.GsonConverterFactory
|
||||
|
||||
object CardRetrofitHelper {
|
||||
val baseUrl = "https://10.0.2.2:7239/"
|
||||
|
||||
fun getInstance(): Retrofit {
|
||||
return Retrofit.Builder()
|
||||
.baseUrl(baseUrl)
|
||||
.addConverterFactory(GsonConverterFactory.create())
|
||||
.build()
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.mitchelbv.thuis_c.network.card
|
||||
|
||||
import com.mitchelbv.thuis_c.network.card.responses.Card
|
||||
import com.mitchelbv.thuis_c.network.card.responses.Cards
|
||||
import retrofit2.http.GET
|
||||
|
||||
interface CardService {
|
||||
@GET("Card")
|
||||
suspend fun getCards(): Cards
|
||||
|
||||
@GET("Card/{id}")
|
||||
suspend fun getCard(id: Int): Card
|
||||
}
|
||||
@@ -3,17 +3,17 @@ package com.mitchelbv.thuis_c.network.feyenoord.responses
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
|
||||
data class EventStartDateTimeFormatted (
|
||||
data class EventStartDateTimeFormatted(
|
||||
|
||||
@SerializedName("DateTime" ) var DateTime : String? = null,
|
||||
@SerializedName("Full" ) var Full : String? = null,
|
||||
@SerializedName("DateLong" ) var DateLong : String? = null,
|
||||
@SerializedName("DateShort" ) var DateShort : String? = null,
|
||||
@SerializedName("Time" ) var Time : String? = null,
|
||||
@SerializedName("DayMonth" ) var DayMonth : String? = null,
|
||||
@SerializedName("DayOfWeek" ) var DayOfWeek : Int? = null,
|
||||
@SerializedName("Year" ) var Year : Int? = null,
|
||||
@SerializedName("Month" ) var Month : Int? = null,
|
||||
@SerializedName("Day" ) var Day : Int? = null
|
||||
@SerializedName("DateTime") var DateTime: String? = null,
|
||||
@SerializedName("Full") var Full: String? = null,
|
||||
@SerializedName("DateLong") var DateLong: String? = null,
|
||||
@SerializedName("DateShort") var DateShort: String? = null,
|
||||
@SerializedName("Time") var Time: String? = null,
|
||||
@SerializedName("DayMonth") var DayMonth: String? = null,
|
||||
@SerializedName("DayOfWeek") var DayOfWeek: Int? = null,
|
||||
@SerializedName("Year") var Year: Int? = null,
|
||||
@SerializedName("Month") var Month: Int? = null,
|
||||
@SerializedName("Day") var Day: Int? = null
|
||||
|
||||
)
|
||||
@@ -4,9 +4,7 @@ import com.google.gson.annotations.SerializedName
|
||||
|
||||
|
||||
data class FeyenoordEventResponse(
|
||||
|
||||
@SerializedName("HeaderItem") var HeaderItem: HeaderItem? = HeaderItem(),
|
||||
@SerializedName("TabItems") var TabItems: ArrayList<TabItems> = arrayListOf(),
|
||||
@SerializedName("CrossSellInfo") var CrossSellInfo: String? = null
|
||||
|
||||
)
|
||||
@@ -3,61 +3,61 @@ package com.mitchelbv.thuis_c.network.feyenoord.responses
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
|
||||
data class HeaderItem (
|
||||
data class HeaderItem(
|
||||
|
||||
@SerializedName("DisplayCountdown" ) var DisplayCountdown : Boolean? = null,
|
||||
@SerializedName("ShowResellInHeader" ) var ShowResellInHeader : Boolean? = null,
|
||||
@SerializedName("ResellTicketsAllowed" ) var ResellTicketsAllowed : Boolean? = null,
|
||||
@SerializedName("ResellTicketsFrom" ) var ResellTicketsFrom : String? = null,
|
||||
@SerializedName("ResellTicketsTill" ) var ResellTicketsTill : String? = null,
|
||||
@SerializedName("EventId" ) var EventId : Int? = null,
|
||||
@SerializedName("SaleCategoryId" ) var SaleCategoryId : Int? = null,
|
||||
@SerializedName("HasGeneralSale" ) var HasGeneralSale : Boolean? = null,
|
||||
@SerializedName("VisibleInShop" ) var VisibleInShop : Boolean? = null,
|
||||
@SerializedName("HighlightInShop" ) var HighlightInShop : Boolean? = null,
|
||||
@SerializedName("HasSoldOut" ) var HasSoldOut : Boolean? = null,
|
||||
@SerializedName("OnGeneralSaleFrom" ) var OnGeneralSaleFrom : String? = null,
|
||||
@SerializedName("OnGeneralSaleTill" ) var OnGeneralSaleTill : String? = null,
|
||||
@SerializedName("VisibleInShopFrom" ) var VisibleInShopFrom : String? = null,
|
||||
@SerializedName("VisibleInShopTill" ) var VisibleInShopTill : String? = null,
|
||||
@SerializedName("Name" ) var Name : String? = null,
|
||||
@SerializedName("NameHomeTeam" ) var NameHomeTeam : String? = null,
|
||||
@SerializedName("NameAwayTeam" ) var NameAwayTeam : String? = null,
|
||||
@SerializedName("EventStartDateTime" ) var EventStartDateTime : String? = null,
|
||||
@SerializedName("EventStartDateTimeOffset" ) var EventStartDateTimeOffset : String? = null,
|
||||
@SerializedName("EventEndDateTime" ) var EventEndDateTime : String? = null,
|
||||
@SerializedName("CategoryTranslationCode" ) var CategoryTranslationCode : String? = null,
|
||||
@SerializedName("SaleCategoryOrder" ) var SaleCategoryOrder : Int? = null,
|
||||
@SerializedName("ImageId" ) var ImageId : String? = null,
|
||||
@SerializedName("ImageFileName" ) var ImageFileName : String? = null,
|
||||
@SerializedName("ImageUniqueName" ) var ImageUniqueName : String? = null,
|
||||
@SerializedName("HomeImageId" ) var HomeImageId : Int? = null,
|
||||
@SerializedName("HomeImageFileName" ) var HomeImageFileName : String? = null,
|
||||
@SerializedName("HomeImageUniqueName" ) var HomeImageUniqueName : String? = null,
|
||||
@SerializedName("AwayImageId" ) var AwayImageId : Int? = null,
|
||||
@SerializedName("AwayImageFileName" ) var AwayImageFileName : String? = null,
|
||||
@SerializedName("AwayImageUniqueName" ) var AwayImageUniqueName : String? = null,
|
||||
@SerializedName("HasTicketsAvailable" ) var HasTicketsAvailable : Boolean? = null,
|
||||
@SerializedName("HasMarketplaceTicketsAvailable" ) var HasMarketplaceTicketsAvailable : Boolean? = null,
|
||||
@SerializedName("HasPossibleTicketsInFuture" ) var HasPossibleTicketsInFuture : Boolean? = null,
|
||||
@SerializedName("CurrentlyOnSaleForUser" ) var CurrentlyOnSaleForUser : Boolean? = null,
|
||||
@SerializedName("PurchaseRightAvailableAfterLogin" ) var PurchaseRightAvailableAfterLogin : Boolean? = null,
|
||||
@SerializedName("ImageUrl" ) var ImageUrl : String? = null,
|
||||
@SerializedName("HomeImageUrl" ) var HomeImageUrl : String? = null,
|
||||
@SerializedName("AwayImageUrl" ) var AwayImageUrl : String? = null,
|
||||
@SerializedName("EventTypeName" ) var EventTypeName : String? = null,
|
||||
@SerializedName("EventTypeLogoId" ) var EventTypeLogoId : Int? = null,
|
||||
@SerializedName("EventTypeLogoUrl" ) var EventTypeLogoUrl : String? = null,
|
||||
@SerializedName("EventTypeLogoFileName" ) var EventTypeLogoFileName : String? = null,
|
||||
@SerializedName("EventTypeLogoUniqueName" ) var EventTypeLogoUniqueName : String? = null,
|
||||
@SerializedName("InfoUrl" ) var InfoUrl : String? = null,
|
||||
@SerializedName("EventStartDateTimeFormatted" ) var EventStartDateTimeFormatted : EventStartDateTimeFormatted? = EventStartDateTimeFormatted(),
|
||||
@SerializedName("EventEndDateTimeFormatted" ) var EventEndDateTimeFormatted : EventEndDateTimeFormatted? = EventEndDateTimeFormatted(),
|
||||
@SerializedName("ButtonData" ) var ButtonData : ButtonData? = ButtonData(),
|
||||
@SerializedName("ShowMarketplaceForEvent" ) var ShowMarketplaceForEvent : Boolean? = null,
|
||||
@SerializedName("RedirectToMarketplace" ) var RedirectToMarketplace : Boolean? = null,
|
||||
@SerializedName("MarketplaceButtonTextColor" ) var MarketplaceButtonTextColor : String? = null,
|
||||
@SerializedName("MarketplaceButtonBackgroundColor" ) var MarketplaceButtonBackgroundColor : String? = null,
|
||||
@SerializedName("DeepLinkRoute" ) var DeepLinkRoute : String? = null
|
||||
@SerializedName("DisplayCountdown") var DisplayCountdown: Boolean? = null,
|
||||
@SerializedName("ShowResellInHeader") var ShowResellInHeader: Boolean? = null,
|
||||
@SerializedName("ResellTicketsAllowed") var ResellTicketsAllowed: Boolean? = null,
|
||||
@SerializedName("ResellTicketsFrom") var ResellTicketsFrom: String? = null,
|
||||
@SerializedName("ResellTicketsTill") var ResellTicketsTill: String? = null,
|
||||
@SerializedName("EventId") var EventId: Int? = null,
|
||||
@SerializedName("SaleCategoryId") var SaleCategoryId: Int? = null,
|
||||
@SerializedName("HasGeneralSale") var HasGeneralSale: Boolean? = null,
|
||||
@SerializedName("VisibleInShop") var VisibleInShop: Boolean? = null,
|
||||
@SerializedName("HighlightInShop") var HighlightInShop: Boolean? = null,
|
||||
@SerializedName("HasSoldOut") var HasSoldOut: Boolean? = null,
|
||||
@SerializedName("OnGeneralSaleFrom") var OnGeneralSaleFrom: String? = null,
|
||||
@SerializedName("OnGeneralSaleTill") var OnGeneralSaleTill: String? = null,
|
||||
@SerializedName("VisibleInShopFrom") var VisibleInShopFrom: String? = null,
|
||||
@SerializedName("VisibleInShopTill") var VisibleInShopTill: String? = null,
|
||||
@SerializedName("Name") var Name: String? = null,
|
||||
@SerializedName("NameHomeTeam") var NameHomeTeam: String? = null,
|
||||
@SerializedName("NameAwayTeam") var NameAwayTeam: String? = null,
|
||||
@SerializedName("EventStartDateTime") var EventStartDateTime: String? = null,
|
||||
@SerializedName("EventStartDateTimeOffset") var EventStartDateTimeOffset: String? = null,
|
||||
@SerializedName("EventEndDateTime") var EventEndDateTime: String? = null,
|
||||
@SerializedName("CategoryTranslationCode") var CategoryTranslationCode: String? = null,
|
||||
@SerializedName("SaleCategoryOrder") var SaleCategoryOrder: Int? = null,
|
||||
@SerializedName("ImageId") var ImageId: String? = null,
|
||||
@SerializedName("ImageFileName") var ImageFileName: String? = null,
|
||||
@SerializedName("ImageUniqueName") var ImageUniqueName: String? = null,
|
||||
@SerializedName("HomeImageId") var HomeImageId: Int? = null,
|
||||
@SerializedName("HomeImageFileName") var HomeImageFileName: String? = null,
|
||||
@SerializedName("HomeImageUniqueName") var HomeImageUniqueName: String? = null,
|
||||
@SerializedName("AwayImageId") var AwayImageId: Int? = null,
|
||||
@SerializedName("AwayImageFileName") var AwayImageFileName: String? = null,
|
||||
@SerializedName("AwayImageUniqueName") var AwayImageUniqueName: String? = null,
|
||||
@SerializedName("HasTicketsAvailable") var HasTicketsAvailable: Boolean? = null,
|
||||
@SerializedName("HasMarketplaceTicketsAvailable") var HasMarketplaceTicketsAvailable: Boolean? = null,
|
||||
@SerializedName("HasPossibleTicketsInFuture") var HasPossibleTicketsInFuture: Boolean? = null,
|
||||
@SerializedName("CurrentlyOnSaleForUser") var CurrentlyOnSaleForUser: Boolean? = null,
|
||||
@SerializedName("PurchaseRightAvailableAfterLogin") var PurchaseRightAvailableAfterLogin: Boolean? = null,
|
||||
@SerializedName("ImageUrl") var ImageUrl: String? = null,
|
||||
@SerializedName("HomeImageUrl") var HomeImageUrl: String? = null,
|
||||
@SerializedName("AwayImageUrl") var AwayImageUrl: String? = null,
|
||||
@SerializedName("EventTypeName") var EventTypeName: String? = null,
|
||||
@SerializedName("EventTypeLogoId") var EventTypeLogoId: Int? = null,
|
||||
@SerializedName("EventTypeLogoUrl") var EventTypeLogoUrl: String? = null,
|
||||
@SerializedName("EventTypeLogoFileName") var EventTypeLogoFileName: String? = null,
|
||||
@SerializedName("EventTypeLogoUniqueName") var EventTypeLogoUniqueName: String? = null,
|
||||
@SerializedName("InfoUrl") var InfoUrl: String? = null,
|
||||
@SerializedName("EventStartDateTimeFormatted") var EventStartDateTimeFormatted: EventStartDateTimeFormatted? = EventStartDateTimeFormatted(),
|
||||
@SerializedName("EventEndDateTimeFormatted") var EventEndDateTimeFormatted: EventEndDateTimeFormatted? = EventEndDateTimeFormatted(),
|
||||
@SerializedName("ButtonData") var ButtonData: ButtonData? = ButtonData(),
|
||||
@SerializedName("ShowMarketplaceForEvent") var ShowMarketplaceForEvent: Boolean? = null,
|
||||
@SerializedName("RedirectToMarketplace") var RedirectToMarketplace: Boolean? = null,
|
||||
@SerializedName("MarketplaceButtonTextColor") var MarketplaceButtonTextColor: String? = null,
|
||||
@SerializedName("MarketplaceButtonBackgroundColor") var MarketplaceButtonBackgroundColor: String? = null,
|
||||
@SerializedName("DeepLinkRoute") var DeepLinkRoute: String? = null
|
||||
|
||||
)
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mitchelbv.thuis_c.network.thuis
|
||||
|
||||
import retrofit2.Retrofit
|
||||
import retrofit2.converter.gson.GsonConverterFactory
|
||||
|
||||
object ThuisRetrofitHelper {
|
||||
val baseUrl = "http://10.0.2.2:5052/"
|
||||
|
||||
|
||||
private val retrofit = Retrofit.Builder()
|
||||
.baseUrl(baseUrl)
|
||||
.addConverterFactory(GsonConverterFactory.create())
|
||||
.build()
|
||||
|
||||
val thuis = retrofit.create(ThuisService::class.java)
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.mitchelbv.thuis_c.network.thuis
|
||||
|
||||
import com.mitchelbv.thuis_c.network.thuis.responses.*
|
||||
import retrofit2.http.*
|
||||
|
||||
interface ThuisService {
|
||||
// Cards
|
||||
// Getters
|
||||
@GET("api/Card")
|
||||
suspend fun getCards(): ArrayList<Card>
|
||||
|
||||
@GET("api/Card/{id}")
|
||||
suspend fun getCard(id: Int): Card
|
||||
|
||||
// Post
|
||||
@POST("api/card")
|
||||
suspend fun postCard(@Body card: Card): Card
|
||||
|
||||
// Freezer
|
||||
// Getters
|
||||
@GET("api/Freezer")
|
||||
suspend fun getFreezers(): ArrayList<Freezer>
|
||||
|
||||
@GET("api/Freezer/{id}")
|
||||
suspend fun getFreezer(@Path("id") id: Int): Freezer
|
||||
|
||||
// Post
|
||||
@POST("api/Freezer")
|
||||
suspend fun postFreezer(@Body freezer: Freezer): Freezer
|
||||
|
||||
// Put
|
||||
@PUT("api/Freezer/{id}")
|
||||
suspend fun putFreezer(@Body freezer: Freezer): Freezer
|
||||
|
||||
// Delete
|
||||
@DELETE("api/Freezer/{id]")
|
||||
suspend fun deleteFreezer(id: Int)
|
||||
|
||||
// Freezer items
|
||||
|
||||
// Getters
|
||||
@GET("api/FreezerItem")
|
||||
suspend fun getFreezerItems(): FreezerItems
|
||||
|
||||
@GET("api/FreezerItem/{id}")
|
||||
suspend fun getFreezerItem(id: Int): FreezerItem
|
||||
|
||||
@GET("api/FreezerItem/InFreezer/{id}")
|
||||
suspend fun getFreezerItemsInFreezer(id: Int): FreezerItemsInFreezer
|
||||
|
||||
// Post
|
||||
@POST("api/FreezerItem")
|
||||
suspend fun postFreezerItem(@Body freezerItem: FreezerItem): FreezerItem
|
||||
|
||||
// Put
|
||||
@PUT("api/FreezerItem/{id}")
|
||||
suspend fun putFreezerItem(@Body freezerItem: FreezerItem): FreezerItem
|
||||
|
||||
// Delete
|
||||
@DELETE("api/FreezerItem/{id}")
|
||||
suspend fun deleteFreezerItem(id: Int)
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mitchelbv.thuis_c.network.card.responses
|
||||
package com.mitchelbv.thuis_c.network.thuis.responses
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mitchelbv.thuis_c.network.card.responses
|
||||
package com.mitchelbv.thuis_c.network.thuis.responses
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.mitchelbv.thuis_c.network.thuis.responses
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
data class Freezer(
|
||||
@SerializedName("freezerId") var freezerId: Int? = null,
|
||||
@SerializedName("location") var location: String? = null,
|
||||
@SerializedName("amountInFreezer") var amountInFreezer: Int? = null
|
||||
)
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.mitchelbv.thuis_c.network.thuis.responses
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
|
||||
data class FreezerItem(
|
||||
@SerializedName("freezerItemId") var freezerItemId: Int? = null,
|
||||
@SerializedName("item") var item: String? = null,
|
||||
@SerializedName("amount") var amount: Int? = null,
|
||||
@SerializedName("drawer") var drawer: Int? = null,
|
||||
@SerializedName("dateTimeAdded") var dateTimeAdded: String? = null,
|
||||
@SerializedName("freezerId") var freezerId: Int? = null
|
||||
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.mitchelbv.thuis_c.network.thuis.responses
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
data class FreezerItems(
|
||||
@SerializedName("freezerItems") var freezerItems: ArrayList<FreezerItem> = arrayListOf()
|
||||
|
||||
)
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.mitchelbv.thuis_c.network.thuis.responses
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
|
||||
data class FreezerItemsInFreezer(
|
||||
@SerializedName("freezerItemId") var freezerItemId: Int? = null,
|
||||
@SerializedName("item") var item: String? = null,
|
||||
@SerializedName("amount") var amount: Int? = null,
|
||||
@SerializedName("drawer") var drawer: Int? = null,
|
||||
@SerializedName("dateTimeAdded") var dateTimeAdded: String? = null,
|
||||
@SerializedName("freezerId") var freezerId: Int? = null
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.mitchelbv.thuis_c.network.thuis.responses
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
data class Freezers(
|
||||
@SerializedName("freezers") var freezers: ArrayList<Freezer> = arrayListOf()
|
||||
)
|
||||
@@ -2,8 +2,8 @@ package com.mitchelbv.thuis_c.ui.card
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.mitchelbv.thuis_c.network.card.CardRetrofitHelper
|
||||
import com.mitchelbv.thuis_c.network.card.CardService
|
||||
import com.mitchelbv.thuis_c.network.thuis.ThuisRetrofitHelper
|
||||
import com.mitchelbv.thuis_c.network.thuis.ThuisService
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.asStateFlow
|
||||
@@ -22,18 +22,18 @@ class CardViewModel : ViewModel() {
|
||||
}
|
||||
|
||||
private fun fillCards() {
|
||||
val tempCards = mutableListOf<Card>()
|
||||
viewModelScope.launch {
|
||||
val cApiClient = CardRetrofitHelper.getInstance().create(CardService::class.java)
|
||||
val apiResponse = cApiClient.getCards()
|
||||
for (card in apiResponse.cards) {
|
||||
tempCards.add(Card(
|
||||
id = card.id!!,
|
||||
code = card.code!!,
|
||||
issuer = card.issuer!!
|
||||
))
|
||||
}
|
||||
}
|
||||
_uiState.value = CardUiState(tempCards)
|
||||
// val tempCards = mutableListOf<Card>()
|
||||
// viewModelScope.launch {
|
||||
// val cApiClient = ThuisRetrofitHelper.getInstance().create(ThuisService::class.java)
|
||||
// val apiResponse = cApiClient.getCards()
|
||||
// for (card in apiResponse.cards) {
|
||||
// tempCards.add(Card(
|
||||
// id = card.id!!,
|
||||
// code = card.code!!,
|
||||
// issuer = card.issuer!!
|
||||
// ))
|
||||
// }
|
||||
// }
|
||||
// _uiState.value = CardUiState(tempCards)
|
||||
}
|
||||
}
|
||||
@@ -6,9 +6,10 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.collectAsState
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||
import androidx.navigation.NavHostController
|
||||
|
||||
@Composable
|
||||
fun CardsScreen(cardViewModel: CardViewModel = viewModel()) {
|
||||
fun CardsScreen(navHostController: NavHostController, cardViewModel: CardViewModel = viewModel()) {
|
||||
val cardUiState by cardViewModel.uiState.collectAsState()
|
||||
Column() {
|
||||
cardUiState.cards.forEach {
|
||||
|
||||
@@ -46,7 +46,7 @@ fun TeamNameWithLogo(team_name: String, team_logo_url: String, modifier: Modifie
|
||||
AsyncImage(
|
||||
model = team_logo_url,
|
||||
contentDescription = team_name,
|
||||
placeholder = painterResource(id = R.drawable.ic_launcher_foreground),
|
||||
placeholder = painterResource(id = R.drawable.placeholder),
|
||||
contentScale = ContentScale.Fit,
|
||||
modifier = modifier.size(64.dp)
|
||||
)
|
||||
|
||||
@@ -29,7 +29,6 @@ class FeyenoordViewModel : ViewModel() {
|
||||
}
|
||||
|
||||
private fun fillMatches() {
|
||||
// TODO Get data from the internet
|
||||
val tempMatches = mutableListOf<Match>()
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
val apiResponse = FeyenoordRetrofitHelper.feyenoord.getEvents()
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
package com.mitchelbv.thuis_c.ui.freezer
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.foundation.lazy.items
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.Edit
|
||||
import androidx.compose.material3.*
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.collectAsState
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||
import androidx.navigation.NavHostController
|
||||
import com.mitchelbv.thuis_c.R
|
||||
import com.mitchelbv.thuis_c.Screen
|
||||
import com.mitchelbv.thuis_c.network.thuis.responses.Freezer
|
||||
|
||||
@Composable
|
||||
fun FreezerScreen(
|
||||
navHostController: NavHostController,
|
||||
freezerViewModel: FreezerViewModel = viewModel()
|
||||
) {
|
||||
val freezerUiState by freezerViewModel.uiState.collectAsState()
|
||||
FreezerList(freezerUiState.freezers, navHostController, Modifier)
|
||||
FloatingActionButton(onClick = { navHostController.navigate("edit_freezer") }) {
|
||||
Icon(Icons.Default.Edit, contentDescription = "Edit")
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun FreezerList(freezers: List<Freezer>, navHostController: NavHostController, modifier: Modifier) {
|
||||
if (freezers.isNotEmpty()) {
|
||||
LazyColumn {
|
||||
items(freezers) { freezer ->
|
||||
FreezerListItem(
|
||||
freezer = freezer,
|
||||
navigateTo = { navHostController.navigate("${Screen.FreezerDetails.route}/${freezer.freezerId}") },
|
||||
modifier = modifier
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
Text(stringResource(id = R.string.freezer_list_empty))
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun FreezerListItem(freezer: Freezer, navigateTo: () -> Unit, modifier: Modifier) {
|
||||
Row(
|
||||
modifier = modifier
|
||||
.fillMaxWidth()
|
||||
.height(150.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.SpaceBetween
|
||||
) {
|
||||
Text(freezer.location!!)
|
||||
Column(
|
||||
horizontalAlignment = Alignment.End,
|
||||
verticalArrangement = Arrangement.Center,
|
||||
modifier = modifier.fillMaxHeight()
|
||||
) {
|
||||
Icon(
|
||||
painter = painterResource(id = R.drawable.arrow),
|
||||
contentDescription = "arrow",
|
||||
modifier = modifier.size(20.dp)
|
||||
)
|
||||
Text("${freezer.amountInFreezer} artikelen")
|
||||
}
|
||||
|
||||
}
|
||||
Spacer(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.background(Color(0f, 0f, 0f, .5f))
|
||||
.height(1.dp)
|
||||
)
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun FreezerCard(freezer: Freezer, navigateTo: () -> Unit) {
|
||||
Card(
|
||||
onClick = { navigateTo() }, modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.height(100.dp)
|
||||
.padding(10.dp)
|
||||
) {
|
||||
Text(freezer.location!!)
|
||||
}
|
||||
}
|
||||
|
||||
@Preview(widthDp = 250, showBackground = true, heightDp = 300)
|
||||
@Composable
|
||||
fun FreezerListItemPreview() {
|
||||
val freezer = Freezer(freezerId = 1, location = "Keuken", amountInFreezer = 5)
|
||||
FreezerListItem(freezer = freezer, modifier = Modifier, navigateTo = {})
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.mitchelbv.thuis_c.ui.freezer
|
||||
|
||||
import android.util.Log
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.mitchelbv.thuis_c.network.thuis.ThuisRetrofitHelper
|
||||
import com.mitchelbv.thuis_c.network.thuis.responses.Freezer
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.asStateFlow
|
||||
import kotlinx.coroutines.launch
|
||||
import java.net.ConnectException
|
||||
|
||||
data class FreezerUiState(
|
||||
val freezers: List<Freezer> = listOf()
|
||||
)
|
||||
|
||||
class FreezerViewModel : ViewModel() {
|
||||
private val _uiState = MutableStateFlow(FreezerUiState())
|
||||
val uiState: StateFlow<FreezerUiState> = _uiState.asStateFlow()
|
||||
|
||||
init {
|
||||
fillFreezer()
|
||||
}
|
||||
|
||||
private fun fillFreezer() {
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
try {
|
||||
val apiResponse = ThuisRetrofitHelper.thuis.getFreezers()
|
||||
_uiState.value = FreezerUiState(apiResponse)
|
||||
} catch (e: ConnectException) {
|
||||
_uiState.value = FreezerUiState(listOf())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.mitchelbv.thuis_c.ui.freezer.detailed
|
||||
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.navigation.NavHostController
|
||||
|
||||
@Composable
|
||||
fun FreezerDetailedScreen(navHostController: NavHostController, freezerId: String?) {
|
||||
Text("Hi!, requesting for freezer $freezerId")
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.mitchelbv.thuis_c.ui.freezer.detailed
|
||||
|
||||
import android.util.Log
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.mitchelbv.thuis_c.network.thuis.ThuisRetrofitHelper
|
||||
import com.mitchelbv.thuis_c.network.thuis.responses.Freezer
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.asStateFlow
|
||||
import kotlinx.coroutines.launch
|
||||
import java.net.ConnectException
|
||||
|
||||
data class FreezerEditUiState(
|
||||
var freezerName: String = "",
|
||||
)
|
||||
|
||||
class FreezerEditViewModel : ViewModel() {
|
||||
private val _uiState = MutableStateFlow(FreezerEditUiState())
|
||||
val uiState: StateFlow<FreezerEditUiState> = _uiState.asStateFlow()
|
||||
|
||||
init {
|
||||
fillFreezerTextField()
|
||||
}
|
||||
|
||||
private fun fillFreezerTextField() {
|
||||
// Todo
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.mitchelbv.thuis_c.ui.freezer.edit
|
||||
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.material3.Button
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.TextField
|
||||
import androidx.compose.runtime.*
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||
import androidx.navigation.NavHostController
|
||||
import com.mitchelbv.thuis_c.ui.freezer.detailed.FreezerEditViewModel
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun FreezerEditScreen(
|
||||
navHostController: NavHostController,
|
||||
freezerEditViewModel: FreezerEditViewModel = viewModel(),
|
||||
freezerId: String?) {
|
||||
val freezerUiState by freezerEditViewModel.uiState.collectAsState()
|
||||
val freezerName by remember { mutableStateOf(freezerUiState.freezerName)}
|
||||
|
||||
Text("Hi!, editing (or creating) freezer. $freezerId")
|
||||
Column {
|
||||
TextField(value = freezerName, onValueChange = { freezerUiState.freezerName = it })
|
||||
Button(onClick = { /* TODO */ }) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,56 @@
|
||||
package com.mitchelbv.thuis_c.ui.home
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.material3.*
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.navigation.NavHostController
|
||||
import com.mitchelbv.thuis_c.ui.theme.Typography
|
||||
import com.mitchelbv.thuis_c.R
|
||||
import com.mitchelbv.thuis_c.Screen
|
||||
|
||||
@Composable
|
||||
fun HomeScreen(navController: NavHostController) {
|
||||
Column(horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center) {
|
||||
Column(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
verticalArrangement = Arrangement.Center
|
||||
) {
|
||||
Text("De thuis app!", style = Typography.bodySmall)
|
||||
// Row(modifier = Modifier.height(100.dp).width(180.dp)) {
|
||||
// HomeCard(cardId = R.drawable.storefront, cardText = R.string.home_card_cards, routeTo = Screen.Cards.route, navController = navController)
|
||||
// HomeCard(cardId = R.drawable.feyenoord, cardText = R.string.home_card_freezer, routeTo = Screen.Freezer.route, navController = navController)
|
||||
HomeButton(buttonText = R.string.home_card_cards, routeTo = Screen.Cards.route, navController = navController)
|
||||
HomeButton(buttonText = R.string.home_card_freezer, routeTo = Screen.Freezer.route, navController = navController)
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun HomeCard(cardId: Int, cardText: Int, routeTo: String, navController: NavHostController) {
|
||||
Card(onClick = { navController.navigate(routeTo) }) {
|
||||
Row(modifier = Modifier.fillMaxSize()) {
|
||||
Icon(
|
||||
painterResource(cardId), contentDescription = null, modifier = Modifier
|
||||
.padding(end = 10.dp)
|
||||
)
|
||||
Text(
|
||||
text = stringResource(id = cardText),
|
||||
Modifier
|
||||
.padding(10.dp)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun HomeButton(buttonText: Int, routeTo: String, navController: NavHostController) {
|
||||
Button(onClick = { navController.navigate(routeTo) }) {
|
||||
Text(stringResource(id = buttonText))
|
||||
}
|
||||
}
|
||||
@@ -31,6 +31,7 @@ fun RecipeScreen(navHostController: NavHostController) {
|
||||
}
|
||||
settings.javaScriptEnabled = true
|
||||
settings.domStorageEnabled = true
|
||||
settings.safeBrowsingEnabled = false
|
||||
loadUrl("https://rs.mitchelbv.nl/")
|
||||
webView = this
|
||||
}
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="85.84757"
|
||||
android:endY="92.4963"
|
||||
android:startX="42.9492"
|
||||
android:startY="49.59793"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
||||
14
app/src/main/res/drawable/arrow.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="63.66dp"
|
||||
android:height="158.48dp"
|
||||
android:viewportWidth="63.66"
|
||||
android:viewportHeight="158.48">
|
||||
<path
|
||||
android:pathData="M63.66,79.24l-8.17,5.72l-55.48,-79.24l8.17,-5.72z"
|
||||
android:strokeWidth="0.236994"
|
||||
android:fillColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M63.66,79.24l-8.17,-5.72l-55.48,79.24l8.17,5.72z"
|
||||
android:strokeWidth="0.24"
|
||||
android:fillColor="#000000"/>
|
||||
</vector>
|
||||
@@ -1,170 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="#3DDC84"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
</vector>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<color android:name="ic_launcher_background"
|
||||
tools:ignore="ExtraText">#FFFFFF</color>
|
||||
</resources>
|
||||
BIN
app/src/main/res/drawable/placeholder.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
4
app/src/main/res/drawable/storefront.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<vector android:height="48dp" android:viewportHeight="24"
|
||||
android:viewportWidth="24" android:width="48dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#000000" android:pathData="M21.9,8.89l-1.05,-4.37c-0.22,-0.9 -1,-1.52 -1.91,-1.52H5.05C4.15,3 3.36,3.63 3.15,4.52L2.1,8.89c-0.24,1.02 -0.02,2.06 0.62,2.88C2.8,11.88 2.91,11.96 3,12.06V19c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2v-6.94c0.09,-0.09 0.2,-0.18 0.28,-0.28C21.92,10.96 22.15,9.91 21.9,8.89zM18.91,4.99l1.05,4.37c0.1,0.42 0.01,0.84 -0.25,1.17C19.57,10.71 19.27,11 18.77,11c-0.61,0 -1.14,-0.49 -1.21,-1.14L16.98,5L18.91,4.99zM13,5h1.96l0.54,4.52c0.05,0.39 -0.07,0.78 -0.33,1.07C14.95,10.85 14.63,11 14.22,11C13.55,11 13,10.41 13,9.69V5zM8.49,9.52L9.04,5H11v4.69C11,10.41 10.45,11 9.71,11c-0.34,0 -0.65,-0.15 -0.89,-0.41C8.57,10.3 8.45,9.91 8.49,9.52zM4.04,9.36L5.05,5h1.97L6.44,9.86C6.36,10.51 5.84,11 5.23,11c-0.49,0 -0.8,-0.29 -0.93,-0.47C4.03,10.21 3.94,9.78 4.04,9.36zM5,19v-6.03C5.08,12.98 5.15,13 5.23,13c0.87,0 1.66,-0.36 2.24,-0.95c0.6,0.6 1.4,0.95 2.31,0.95c0.87,0 1.65,-0.36 2.23,-0.93c0.59,0.57 1.39,0.93 2.29,0.93c0.84,0 1.64,-0.35 2.24,-0.95c0.58,0.59 1.37,0.95 2.24,0.95c0.08,0 0.15,-0.02 0.23,-0.03V19H5z"/>
|
||||
</vector>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<background android:drawable="@color/white"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<background android:drawable="@color/white"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
||||
BIN
app/src/main/res/mipmap-hdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 982 B |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
@@ -4,4 +4,10 @@
|
||||
<string name="nav_feyenoord">Wedstrijden</string>
|
||||
<string name="nav_recipes">Recepten</string>
|
||||
<string name="nav_home">Home</string>
|
||||
|
||||
<string name="home_card_cards">Kaarten</string>
|
||||
<string name="home_card_freezer">Vriezer</string>
|
||||
|
||||
<string name="freezer_list_empty">Er zijn geen vriezers</string>
|
||||
<string name="edit_freezer">Vriezer aanpassen</string>
|
||||
</resources>
|
||||
@@ -1,10 +1,10 @@
|
||||
buildscript {
|
||||
ext {
|
||||
compose_version = '1.1.1'
|
||||
compose_version = '1.3.3'
|
||||
}
|
||||
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
plugins {
|
||||
id 'com.android.application' version '7.3.1' apply false
|
||||
id 'com.android.library' version '7.3.1' apply false
|
||||
id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
|
||||
id 'com.android.application' version '7.4.0' apply false
|
||||
id 'com.android.library' version '7.4.0' apply false
|
||||
id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
|
||||
}
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
||||
#Mon Oct 31 14:59:45 CET 2022
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||