Architecture changes, updated MainActivity.kt to be simpler.

Updated colors

Changed main language to english.

Updated kotlin version.
This commit is contained in:
KaasKop-
2023-04-06 14:39:32 +02:00
parent bf071914a4
commit 0630cd048e
27 changed files with 396 additions and 166 deletions

View File

@@ -37,7 +37,7 @@ android {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion '1.3.2'
kotlinCompilerExtensionVersion '1.4.4'
}
packagingOptions {
resources {
@@ -56,18 +56,18 @@ dependencies {
implementation "io.coil-kt:coil-compose:2.2.2"
// Database
implementation "androidx.room:room-runtime:2.5.0"
annotationProcessor("androidx.room:room-compiler:2.5.0")
implementation "androidx.room:room-runtime:2.5.1"
annotationProcessor("androidx.room:room-compiler:2.5.1")
// Navigation
implementation "androidx.navigation:navigation-compose:2.5.3"
// ViewModel
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.5.1"
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.6.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.lifecycle:lifecycle-runtime-ktx:2.6.1'
implementation 'androidx.activity:activity-compose:1.7.0'
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
implementation 'androidx.compose.material3:material3:1.0.1'

View File

@@ -1,90 +1,80 @@
package com.mitchelbv.thuis_c
import android.os.Bundle
import android.util.Log
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.*
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.*
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.navigation.NavDestination.Companion.hierarchy
import androidx.navigation.NavGraph.Companion.findStartDestination
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
import com.mitchelbv.thuis_c.views.feyenoord.MatchesScreen
import com.mitchelbv.thuis_c.views.home.HomeScreen
import com.mitchelbv.thuis_c.views.recipe.RecipeScreen
class MainActivity : ComponentActivity() {
val navigationBarItems = listOf(Home, Recipes, Matches)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
ThuisTheme {
// A surface container using the 'background' color from the theme
Surface(
modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colorScheme.background
) {
ThuisApp()
}
LayoutWithNavSetup();
}
}
}
}
val screenItems = listOf(
Screen.Home,
Screen.Recipes,
Screen.Feyenoord,
)
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun LayoutWithNavSetup() {
val navController = rememberNavController()
var selectedItem by remember { mutableStateOf(0) }
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun ThuisApp() {
val navController = rememberNavController()
val navBackStackEntry by navController.currentBackStackEntryAsState()
Scaffold(
topBar = {
TopAppBar(title = { Text(stringResource(id = R.string.app_name))})
},
bottomBar = {
NavigationBar {
val currentDestination = navBackStackEntry?.destination
screenItems.forEach { screen ->
NavigationBarItem(
icon = { Icon(screen.icon, contentDescription = stringResource(id = screen.resourceId))},
label = { Text(stringResource(id = screen.resourceId))},
selected = currentDestination?.hierarchy?.any {it.route == screen.route} == true,
onClick = {
navController.navigate(screen.route) {
popUpTo(navController.graph.findStartDestination().id) {
saveState = true
}
launchSingleTop = true
restoreState = true
}
})
Scaffold(
topBar = {
TopAppBar(title = {
Text(stringResource(id = R.string.app_name))
})
},
bottomBar = {
NavigationBar {
navigationBarItems.forEachIndexed { index, screen ->
NavigationBarItem(
icon = {
Icon(
screen.icon,
contentDescription = stringResource(id = screen.destinationName)
)
},
label = { Text(stringResource(id = screen.destinationName)) },
selected = selectedItem == index,
onClick = {
navController.navigate(screen.route)
selectedItem = index
})
}
}
}
}
) { innerPadding ->
NavHost(navController = navController, startDestination = "home", Modifier.padding(innerPadding)) {
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) }
) { innerPadding ->
NavHost(
navController = navController,
startDestination = Home.route,
modifier = Modifier.padding(innerPadding)
) {
composable(route = Home.route) {
HomeScreen(onClickFreezers = {
navController.navigate(
Home.route
)
})
}
composable(route = Recipes.route) { RecipeScreen() }
composable(route = Matches.route) { MatchesScreen() }
}
}
}
}

View File

@@ -1,17 +0,0 @@
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)
}

View File

@@ -0,0 +1,29 @@
package com.mitchelbv.thuis_c
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.*
import androidx.compose.ui.graphics.vector.ImageVector
interface ThuisDestination {
val icon: ImageVector
val destinationName: Int
val route: String
}
object Home : ThuisDestination {
override val icon = Icons.Default.Home
override val destinationName = R.string.nav_home
override val route = "home"
}
object Recipes : ThuisDestination {
override val icon = Icons.Default.List
override val destinationName = R.string.nav_recipes
override val route = "recipes"
}
object Matches : ThuisDestination {
override val icon = Icons.Default.DateRange
override val destinationName = R.string.nav_matches
override val route = "matches"
}

View File

@@ -2,10 +2,67 @@ package com.mitchelbv.thuis_c.ui.theme
import androidx.compose.ui.graphics.Color
val Purple80 = Color(0xFFD0BCFF)
val PurpleGrey80 = Color(0xFFCCC2DC)
val Pink80 = Color(0xFFEFB8C8)
val md_theme_light_primary = Color(0xFF9F3087)
val md_theme_light_onPrimary = Color(0xFFFFFFFF)
val md_theme_light_primaryContainer = Color(0xFFFFD8EE)
val md_theme_light_onPrimaryContainer = Color(0xFF3A0030)
val md_theme_light_secondary = Color(0xFF3154C8)
val md_theme_light_onSecondary = Color(0xFFFFFFFF)
val md_theme_light_secondaryContainer = Color(0xFFDCE1FF)
val md_theme_light_onSecondaryContainer = Color(0xFF001551)
val md_theme_light_tertiary = Color(0xFF425AA9)
val md_theme_light_onTertiary = Color(0xFFFFFFFF)
val md_theme_light_tertiaryContainer = Color(0xFFDCE1FF)
val md_theme_light_onTertiaryContainer = Color(0xFF00164F)
val md_theme_light_error = Color(0xFFBA1A1A)
val md_theme_light_errorContainer = Color(0xFFFFDAD6)
val md_theme_light_onError = Color(0xFFFFFFFF)
val md_theme_light_onErrorContainer = Color(0xFF410002)
val md_theme_light_background = Color(0xFFFFFBFF)
val md_theme_light_onBackground = Color(0xFF231A00)
val md_theme_light_surface = Color(0xFFFFFBFF)
val md_theme_light_onSurface = Color(0xFF231A00)
val md_theme_light_surfaceVariant = Color(0xFFEFDEE6)
val md_theme_light_onSurfaceVariant = Color(0xFF4F444A)
val md_theme_light_outline = Color(0xFF81737A)
val md_theme_light_inverseOnSurface = Color(0xFFFFF0CB)
val md_theme_light_inverseSurface = Color(0xFF3C2F00)
val md_theme_light_inversePrimary = Color(0xFFFFADE4)
val md_theme_light_shadow = Color(0xFF000000)
val md_theme_light_surfaceTint = Color(0xFF9F3087)
val md_theme_light_outlineVariant = Color(0xFFD2C2CA)
val md_theme_light_scrim = Color(0xFF000000)
val Purple40 = Color(0xFF6650a4)
val PurpleGrey40 = Color(0xFF625b71)
val Pink40 = Color(0xFF7D5260)
val md_theme_dark_primary = Color(0xFFFFADE4)
val md_theme_dark_onPrimary = Color(0xFF5F004F)
val md_theme_dark_primaryContainer = Color(0xFF81126D)
val md_theme_dark_onPrimaryContainer = Color(0xFFFFD8EE)
val md_theme_dark_secondary = Color(0xFFB7C4FF)
val md_theme_dark_onSecondary = Color(0xFF002681)
val md_theme_dark_secondaryContainer = Color(0xFF0A3AB0)
val md_theme_dark_onSecondaryContainer = Color(0xFFDCE1FF)
val md_theme_dark_tertiary = Color(0xFFB6C4FF)
val md_theme_dark_onTertiary = Color(0xFF082978)
val md_theme_dark_tertiaryContainer = Color(0xFF284190)
val md_theme_dark_onTertiaryContainer = Color(0xFFDCE1FF)
val md_theme_dark_error = Color(0xFFFFB4AB)
val md_theme_dark_errorContainer = Color(0xFF93000A)
val md_theme_dark_onError = Color(0xFF690005)
val md_theme_dark_onErrorContainer = Color(0xFFFFDAD6)
val md_theme_dark_background = Color(0xFF231A00)
val md_theme_dark_onBackground = Color(0xFFFFE086)
val md_theme_dark_surface = Color(0xFF231A00)
val md_theme_dark_onSurface = Color(0xFFFFE086)
val md_theme_dark_surfaceVariant = Color(0xFF4F444A)
val md_theme_dark_onSurfaceVariant = Color(0xFFD2C2CA)
val md_theme_dark_outline = Color(0xFF9B8D94)
val md_theme_dark_inverseOnSurface = Color(0xFF231A00)
val md_theme_dark_inverseSurface = Color(0xFFFFE086)
val md_theme_dark_inversePrimary = Color(0xFF9F3087)
val md_theme_dark_shadow = Color(0xFF000000)
val md_theme_dark_surfaceTint = Color(0xFFFFADE4)
val md_theme_dark_outlineVariant = Color(0xFF4F444A)
val md_theme_dark_scrim = Color(0xFF000000)
val seed = Color(0xFF9F3087)

View File

@@ -6,39 +6,85 @@ import androidx.compose.material3.darkColorScheme
import androidx.compose.material3.lightColorScheme
import androidx.compose.runtime.Composable
private val DarkColorScheme = darkColorScheme(
primary = Purple80,
secondary = PurpleGrey80,
tertiary = Pink80
private val LightColors = lightColorScheme(
primary = md_theme_light_primary,
onPrimary = md_theme_light_onPrimary,
primaryContainer = md_theme_light_primaryContainer,
onPrimaryContainer = md_theme_light_onPrimaryContainer,
secondary = md_theme_light_secondary,
onSecondary = md_theme_light_onSecondary,
secondaryContainer = md_theme_light_secondaryContainer,
onSecondaryContainer = md_theme_light_onSecondaryContainer,
tertiary = md_theme_light_tertiary,
onTertiary = md_theme_light_onTertiary,
tertiaryContainer = md_theme_light_tertiaryContainer,
onTertiaryContainer = md_theme_light_onTertiaryContainer,
error = md_theme_light_error,
errorContainer = md_theme_light_errorContainer,
onError = md_theme_light_onError,
onErrorContainer = md_theme_light_onErrorContainer,
background = md_theme_light_background,
onBackground = md_theme_light_onBackground,
surface = md_theme_light_surface,
onSurface = md_theme_light_onSurface,
surfaceVariant = md_theme_light_surfaceVariant,
onSurfaceVariant = md_theme_light_onSurfaceVariant,
outline = md_theme_light_outline,
inverseOnSurface = md_theme_light_inverseOnSurface,
inverseSurface = md_theme_light_inverseSurface,
inversePrimary = md_theme_light_inversePrimary,
surfaceTint = md_theme_light_surfaceTint,
outlineVariant = md_theme_light_outlineVariant,
scrim = md_theme_light_scrim,
)
private val LightColorScheme = lightColorScheme(
primary = Purple40,
secondary = PurpleGrey40,
tertiary = Pink40
/* Other default colors to override
background = Color(0xFFFFFBFE),
surface = Color(0xFFFFFBFE),
onPrimary = Color.White,
onSecondary = Color.White,
onTertiary = Color.White,
onBackground = Color(0xFF1C1B1F),
onSurface = Color(0xFF1C1B1F),
*/
private val DarkColors = darkColorScheme(
primary = md_theme_dark_primary,
onPrimary = md_theme_dark_onPrimary,
primaryContainer = md_theme_dark_primaryContainer,
onPrimaryContainer = md_theme_dark_onPrimaryContainer,
secondary = md_theme_dark_secondary,
onSecondary = md_theme_dark_onSecondary,
secondaryContainer = md_theme_dark_secondaryContainer,
onSecondaryContainer = md_theme_dark_onSecondaryContainer,
tertiary = md_theme_dark_tertiary,
onTertiary = md_theme_dark_onTertiary,
tertiaryContainer = md_theme_dark_tertiaryContainer,
onTertiaryContainer = md_theme_dark_onTertiaryContainer,
error = md_theme_dark_error,
errorContainer = md_theme_dark_errorContainer,
onError = md_theme_dark_onError,
onErrorContainer = md_theme_dark_onErrorContainer,
background = md_theme_dark_background,
onBackground = md_theme_dark_onBackground,
surface = md_theme_dark_surface,
onSurface = md_theme_dark_onSurface,
surfaceVariant = md_theme_dark_surfaceVariant,
onSurfaceVariant = md_theme_dark_onSurfaceVariant,
outline = md_theme_dark_outline,
inverseOnSurface = md_theme_dark_inverseOnSurface,
inverseSurface = md_theme_dark_inverseSurface,
inversePrimary = md_theme_dark_inversePrimary,
surfaceTint = md_theme_dark_surfaceTint,
outlineVariant = md_theme_dark_outlineVariant,
scrim = md_theme_dark_scrim,
)
@Composable
fun ThuisTheme(darkTheme: Boolean = isSystemInDarkTheme(), content: @Composable () -> Unit) {
val colors = if (darkTheme) {
DarkColorScheme
fun ThuisTheme(
useDarkTheme: Boolean = isSystemInDarkTheme(),
content: @Composable() () -> Unit
) {
val colors = if (!useDarkTheme) {
LightColors
} else {
LightColorScheme
DarkColors
}
MaterialTheme(
colorScheme = colors,
typography = Typography,
content = content
content = content,
typography = ThuisTypography
)
}

View File

@@ -7,15 +7,14 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.sp
// Set of Material typography styles to start with
val Typography = Typography(
val ThuisTypography = Typography(
bodyLarge = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 16.sp,
lineHeight = 24.sp,
letterSpacing = 0.5.sp
)
/* Other default text styles to override
),
titleLarge = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
@@ -30,5 +29,4 @@ val Typography = Typography(
lineHeight = 16.sp,
letterSpacing = 0.5.sp
)
*/
)

View File

@@ -1,4 +1,4 @@
package com.mitchelbv.thuis_c.ui.card
package com.mitchelbv.thuis_c.views.card
data class Card(
val id: Int,

View File

@@ -1,4 +1,4 @@
package com.mitchelbv.thuis_c.ui.card
package com.mitchelbv.thuis_c.views.card
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope

View File

@@ -1,4 +1,4 @@
package com.mitchelbv.thuis_c.ui.card
package com.mitchelbv.thuis_c.views.card
import androidx.compose.foundation.layout.Column
import androidx.compose.material3.*

View File

@@ -1,4 +1,4 @@
package com.mitchelbv.thuis_c.ui.feyenoord
package com.mitchelbv.thuis_c.views.feyenoord
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.rememberScrollState
@@ -20,7 +20,7 @@ import coil.compose.AsyncImage
import com.mitchelbv.thuis_c.R
@Composable
fun FeyenoordScreen(feyenoordViewModel: FeyenoordViewModel = viewModel(), navHostController: NavHostController) {
fun MatchesScreen(feyenoordViewModel: FeyenoordViewModel = viewModel()) {
val feyenoordUiState by feyenoordViewModel.uiState.collectAsState()
Column(
modifier = Modifier

View File

@@ -1,4 +1,4 @@
package com.mitchelbv.thuis_c.ui.feyenoord
package com.mitchelbv.thuis_c.views.feyenoord
import android.util.Log
import androidx.lifecycle.ViewModel
@@ -36,7 +36,8 @@ class FeyenoordViewModel : ViewModel() {
val test = arrayOf(tabItem).filter { it.CategoryId == 2 }
test.forEach {
for (item in it.Items) {
tempMatches.add(Match(
tempMatches.add(
Match(
home_team = item.NameHomeTeam!!,
away_team = item.NameAwayTeam!!,
date = item.EventStartDateTimeFormatted?.Full!!,
@@ -44,7 +45,8 @@ class FeyenoordViewModel : ViewModel() {
end_time = item.EventEndDateTimeFormatted?.Time!!,
away_image = item.AwayImageUrl!!,
home_image = item.HomeImageUrl!!
))
)
)
}
}
}

View File

@@ -1,4 +1,4 @@
package com.mitchelbv.thuis_c.ui.feyenoord
package com.mitchelbv.thuis_c.views.feyenoord
data class Match(
val home_image: String,

View File

@@ -1,4 +1,4 @@
package com.mitchelbv.thuis_c.ui.freezer
package com.mitchelbv.thuis_c.views.freezer
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
@@ -20,7 +20,6 @@ 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
@@ -40,11 +39,11 @@ fun FreezerList(freezers: List<Freezer>, navHostController: NavHostController, m
if (freezers.isNotEmpty()) {
LazyColumn {
items(freezers) { freezer ->
FreezerListItem(
freezer = freezer,
navigateTo = { navHostController.navigate("${Screen.FreezerDetails.route}/${freezer.freezerId}") },
modifier = modifier
)
// FreezerListItem(
// freezer = freezer,
// navigateTo = { navHostController.navigate("${Screen.FreezerDetails.route}/${freezer.freezerId}") },
// modifier = modifier
// )
}
}

View File

@@ -1,4 +1,4 @@
package com.mitchelbv.thuis_c.ui.freezer
package com.mitchelbv.thuis_c.views.freezer
import android.util.Log
import androidx.lifecycle.ViewModel

View File

@@ -1,4 +1,4 @@
package com.mitchelbv.thuis_c.ui.freezer.detailed
package com.mitchelbv.thuis_c.views.freezer.detailed
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable

View File

@@ -1,4 +1,4 @@
package com.mitchelbv.thuis_c.ui.freezer.detailed
package com.mitchelbv.thuis_c.views.freezer.detailed
import android.util.Log
import androidx.lifecycle.ViewModel

View File

@@ -1,4 +1,4 @@
package com.mitchelbv.thuis_c.ui.freezer.edit
package com.mitchelbv.thuis_c.views.freezer.edit
import androidx.compose.foundation.layout.Column
import androidx.compose.material3.Button
@@ -9,7 +9,7 @@ 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
import com.mitchelbv.thuis_c.views.freezer.detailed.FreezerEditViewModel
@OptIn(ExperimentalMaterial3Api::class)
@Composable

View File

@@ -1,4 +1,4 @@
package com.mitchelbv.thuis_c.ui.home
package com.mitchelbv.thuis_c.views.home
import androidx.compose.foundation.layout.*
import androidx.compose.material3.*
@@ -9,23 +9,22 @@ 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.ui.theme.ThuisTypography
import com.mitchelbv.thuis_c.R
import com.mitchelbv.thuis_c.Screen
@Composable
fun HomeScreen(navController: NavHostController) {
fun HomeScreen(onClickFreezers: () -> Unit) {
Column(
modifier = Modifier.fillMaxSize(),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Center
) {
Text("De thuis app!", style = Typography.bodySmall)
Text(stringResource(id = R.string.app_name), style = ThuisTypography.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)
// 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)
// }
}
}

View File

@@ -1,11 +1,10 @@
package com.mitchelbv.thuis_c.ui.home
package com.mitchelbv.thuis_c.views.home
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.mitchelbv.thuis_c.Screen
import com.mitchelbv.thuis_c.network.feyenoord.FeyenoordRetrofitHelper
import com.mitchelbv.thuis_c.network.feyenoord.FeyenoordService
import com.mitchelbv.thuis_c.ui.feyenoord.Match
import com.mitchelbv.thuis_c.views.feyenoord.Match
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow

View File

@@ -1,4 +1,4 @@
package com.mitchelbv.thuis_c.ui.recipe
package com.mitchelbv.thuis_c.views.recipe
import android.annotation.SuppressLint
import android.view.ViewGroup
@@ -13,7 +13,7 @@ import androidx.navigation.NavHostController
@SuppressLint("SetJavaScriptEnabled")
@Composable
fun RecipeScreen(navHostController: NavHostController) {
fun RecipeScreen() {
var backEnabled by remember { mutableStateOf(true)}
var webView: WebView? = null
AndroidView(modifier = Modifier.fillMaxSize(),

View File

@@ -1,13 +1,13 @@
<resources>
<string name="app_name">Thuis</string>
<string name="nav_feyenoord">Wedstrijden</string>
<string name="nav_recipes">Recepten</string>
<string name="nav_matches">Matches</string>
<string name="nav_recipes">Recipes</string>
<string name="nav_home">Home</string>
<string name="home_card_cards">Kaarten</string>
<string name="home_card_freezer">Vriezer</string>
<string name="home_card_cards">Cards</string>
<string name="home_card_freezer">Freezer</string>
<string name="freezer_list_empty">Er zijn geen vriezers</string>
<string name="edit_freezer">Vriezer aanpassen</string>
<string name="freezer_list_empty">No freezer(s)</string>
<string name="edit_freezer">Edit freezer</string>
</resources>