|
@@ -550,12 +550,12 @@ fun MetroLazy(metro:List<Metro>, viewModel: RouteViewModel = hiltViewModel()){
|
|
}
|
|
}
|
|
|
|
|
|
@Composable
|
|
@Composable
|
|
-fun FoodAdviceLazy(navController: NavController, advice: List<Advice>, viewModel: AdviceViewModel = hiltViewModel()) {
|
|
|
|
|
|
+fun FoodAdviceLazy(advice: List<Advice>, viewModel: AdviceViewModel = hiltViewModel()) {
|
|
LaunchedEffect(Unit) {
|
|
LaunchedEffect(Unit) {
|
|
viewModel.GetAdvice("Питание")
|
|
viewModel.GetAdvice("Питание")
|
|
}
|
|
}
|
|
LazyColumn(
|
|
LazyColumn(
|
|
- modifier = Modifier.fillMaxHeight(0.84f)
|
|
|
|
|
|
+ modifier = Modifier.fillMaxHeight(0.86f)
|
|
) {
|
|
) {
|
|
items(
|
|
items(
|
|
advice,
|
|
advice,
|
|
@@ -563,9 +563,9 @@ fun FoodAdviceLazy(navController: NavController, advice: List<Advice>, viewModel
|
|
) { advice ->
|
|
) { advice ->
|
|
Column(
|
|
Column(
|
|
modifier = Modifier
|
|
modifier = Modifier
|
|
- .fillMaxWidth(0.8f)
|
|
|
|
|
|
+ .fillMaxWidth(0.9f)
|
|
.padding(top = 10.dp)
|
|
.padding(top = 10.dp)
|
|
- .height(175.dp)
|
|
|
|
|
|
+ .height(150.dp)
|
|
.padding(bottom = 10.dp)
|
|
.padding(bottom = 10.dp)
|
|
.border(
|
|
.border(
|
|
width = 4.dp,
|
|
width = 4.dp,
|
|
@@ -585,31 +585,30 @@ fun FoodAdviceLazy(navController: NavController, advice: List<Advice>, viewModel
|
|
Modifier
|
|
Modifier
|
|
.fillMaxWidth()
|
|
.fillMaxWidth()
|
|
.fillMaxHeight()
|
|
.fillMaxHeight()
|
|
- .size(210.dp)
|
|
|
|
- .padding(top = 10.dp),
|
|
|
|
|
|
+ .padding(top = 10.dp, bottom = 0.dp),
|
|
contentAlignment = Alignment.TopCenter
|
|
contentAlignment = Alignment.TopCenter
|
|
) {
|
|
) {
|
|
Text(
|
|
Text(
|
|
text = advice.title,
|
|
text = advice.title,
|
|
color = Color(0xFF510B3C),
|
|
color = Color(0xFF510B3C),
|
|
- fontSize = 16.sp,
|
|
|
|
|
|
+ fontSize = 19.sp,
|
|
fontFamily = RobotoB,
|
|
fontFamily = RobotoB,
|
|
textAlign = TextAlign.Center
|
|
textAlign = TextAlign.Center
|
|
)
|
|
)
|
|
Box(
|
|
Box(
|
|
Modifier
|
|
Modifier
|
|
- .fillMaxWidth()
|
|
|
|
|
|
+ .fillMaxWidth(0.95f)
|
|
.fillMaxHeight()
|
|
.fillMaxHeight()
|
|
- .padding(top = 10.dp, bottom = 20.dp, start = 5.dp),
|
|
|
|
- contentAlignment = Alignment.BottomStart
|
|
|
|
|
|
+ .padding(top = 20.dp,bottom = 10.dp),
|
|
|
|
+ contentAlignment = Alignment.CenterStart
|
|
) {
|
|
) {
|
|
Column(
|
|
Column(
|
|
- verticalArrangement = Arrangement.spacedBy(10.dp)
|
|
|
|
|
|
+ verticalArrangement = Arrangement.spacedBy(0.dp)
|
|
) {
|
|
) {
|
|
Text(
|
|
Text(
|
|
text = advice.description,
|
|
text = advice.description,
|
|
color = Color(0xFF510B3C),
|
|
color = Color(0xFF510B3C),
|
|
- fontSize = 14.sp,
|
|
|
|
|
|
+ fontSize = 16.sp,
|
|
fontFamily = Roboto,
|
|
fontFamily = Roboto,
|
|
textAlign = TextAlign.Center
|
|
textAlign = TextAlign.Center
|
|
)
|
|
)
|
|
@@ -621,6 +620,153 @@ fun FoodAdviceLazy(navController: NavController, advice: List<Advice>, viewModel
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
|
|
|
|
+@Composable
|
|
|
|
+fun TripAdviceLazy(advice: List<Advice>, viewModel: AdviceViewModel = hiltViewModel()) {
|
|
|
|
+ LaunchedEffect(Unit) {
|
|
|
|
+ viewModel.GetAdvice("Путешествие")
|
|
|
|
+ }
|
|
|
|
+ LazyColumn(
|
|
|
|
+ modifier = Modifier.fillMaxHeight(0.86f)
|
|
|
|
+ ) {
|
|
|
|
+ items(
|
|
|
|
+ advice,
|
|
|
|
+ key = { advice -> advice.id },
|
|
|
|
+ ) { advice ->
|
|
|
|
+ Column(
|
|
|
|
+ modifier = Modifier
|
|
|
|
+ .fillMaxWidth(0.9f)
|
|
|
|
+ .padding(top = 10.dp)
|
|
|
|
+ .height(150.dp)
|
|
|
|
+ .padding(bottom = 10.dp)
|
|
|
|
+ .border(
|
|
|
|
+ width = 4.dp,
|
|
|
|
+ color = Color(0xFF510B3C),
|
|
|
|
+ shape = RoundedCornerShape(15.dp)
|
|
|
|
+ ),
|
|
|
|
+ ) {
|
|
|
|
+ Box(
|
|
|
|
+ Modifier
|
|
|
|
+ .fillMaxWidth()
|
|
|
|
+ .fillMaxHeight()
|
|
|
|
+ .clip(RoundedCornerShape(15.dp))
|
|
|
|
+ .background(Color.White)
|
|
|
|
+ ) {
|
|
|
|
+ Row {
|
|
|
|
+ Box(
|
|
|
|
+ Modifier
|
|
|
|
+ .fillMaxWidth()
|
|
|
|
+ .fillMaxHeight()
|
|
|
|
+ .padding(top = 10.dp, bottom = 0.dp),
|
|
|
|
+ contentAlignment = Alignment.TopCenter
|
|
|
|
+ ) {
|
|
|
|
+ Text(
|
|
|
|
+ text = advice.title,
|
|
|
|
+ color = Color(0xFF510B3C),
|
|
|
|
+ fontSize = 19.sp,
|
|
|
|
+ fontFamily = RobotoB,
|
|
|
|
+ textAlign = TextAlign.Center
|
|
|
|
+ )
|
|
|
|
+ Box(
|
|
|
|
+ Modifier
|
|
|
|
+ .fillMaxWidth(0.95f)
|
|
|
|
+ .fillMaxHeight()
|
|
|
|
+ .padding(top = 20.dp,bottom = 10.dp),
|
|
|
|
+ contentAlignment = Alignment.CenterStart
|
|
|
|
+ ) {
|
|
|
|
+ Column(
|
|
|
|
+ verticalArrangement = Arrangement.spacedBy(0.dp)
|
|
|
|
+ ) {
|
|
|
|
+ Text(
|
|
|
|
+ text = advice.description,
|
|
|
|
+ color = Color(0xFF510B3C),
|
|
|
|
+ fontSize = 16.sp,
|
|
|
|
+ fontFamily = Roboto,
|
|
|
|
+ textAlign = TextAlign.Center
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+@Composable
|
|
|
|
+fun HealthAdviceLazy(advice: List<Advice>, viewModel: AdviceViewModel = hiltViewModel()) {
|
|
|
|
+ LaunchedEffect(Unit) {
|
|
|
|
+ viewModel.GetAdvice("Здоровье")
|
|
|
|
+ }
|
|
|
|
+ LazyColumn(
|
|
|
|
+ modifier = Modifier.fillMaxHeight(0.86f)
|
|
|
|
+ ) {
|
|
|
|
+ items(
|
|
|
|
+ advice,
|
|
|
|
+ key = { advice -> advice.id },
|
|
|
|
+ ) { advice ->
|
|
|
|
+ Column(
|
|
|
|
+ modifier = Modifier
|
|
|
|
+ .fillMaxWidth(0.9f)
|
|
|
|
+ .padding(top = 10.dp)
|
|
|
|
+ .height(150.dp)
|
|
|
|
+ .padding(bottom = 10.dp)
|
|
|
|
+ .border(
|
|
|
|
+ width = 4.dp,
|
|
|
|
+ color = Color(0xFF510B3C),
|
|
|
|
+ shape = RoundedCornerShape(15.dp)
|
|
|
|
+ ),
|
|
|
|
+ ) {
|
|
|
|
+ Box(
|
|
|
|
+ Modifier
|
|
|
|
+ .fillMaxWidth()
|
|
|
|
+ .fillMaxHeight()
|
|
|
|
+ .clip(RoundedCornerShape(15.dp))
|
|
|
|
+ .background(Color.White)
|
|
|
|
+ ) {
|
|
|
|
+ Row {
|
|
|
|
+ Box(
|
|
|
|
+ Modifier
|
|
|
|
+ .fillMaxWidth()
|
|
|
|
+ .fillMaxHeight()
|
|
|
|
+ .padding(top = 10.dp, bottom = 0.dp),
|
|
|
|
+ contentAlignment = Alignment.TopCenter
|
|
|
|
+ ) {
|
|
|
|
+ Text(
|
|
|
|
+ text = advice.title,
|
|
|
|
+ color = Color(0xFF510B3C),
|
|
|
|
+ fontSize = 19.sp,
|
|
|
|
+ fontFamily = RobotoB,
|
|
|
|
+ textAlign = TextAlign.Center
|
|
|
|
+ )
|
|
|
|
+ Box(
|
|
|
|
+ Modifier
|
|
|
|
+ .fillMaxWidth(0.95f)
|
|
|
|
+ .fillMaxHeight()
|
|
|
|
+ .padding(top = 20.dp,bottom = 10.dp),
|
|
|
|
+ contentAlignment = Alignment.CenterStart
|
|
|
|
+ ) {
|
|
|
|
+ Column(
|
|
|
|
+ verticalArrangement = Arrangement.spacedBy(0.dp)
|
|
|
|
+ ) {
|
|
|
|
+ Text(
|
|
|
|
+ text = advice.description,
|
|
|
|
+ color = Color(0xFF510B3C),
|
|
|
|
+ fontSize = 16.sp,
|
|
|
|
+ fontFamily = Roboto,
|
|
|
|
+ textAlign = TextAlign.Center
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|