|
@@ -550,12 +550,12 @@ fun MetroLazy(metro:List<Metro>, viewModel: RouteViewModel = hiltViewModel()){
|
|
|
}
|
|
|
|
|
|
@Composable
|
|
|
-fun FoodAdviceLazy(navController: NavController, advice: List<Advice>, viewModel: AdviceViewModel = hiltViewModel()) {
|
|
|
+fun FoodAdviceLazy(advice: List<Advice>, viewModel: AdviceViewModel = hiltViewModel()) {
|
|
|
LaunchedEffect(Unit) {
|
|
|
viewModel.GetAdvice("Питание")
|
|
|
}
|
|
|
LazyColumn(
|
|
|
- modifier = Modifier.fillMaxHeight(0.84f)
|
|
|
+ modifier = Modifier.fillMaxHeight(0.86f)
|
|
|
) {
|
|
|
items(
|
|
|
advice,
|
|
@@ -563,9 +563,9 @@ fun FoodAdviceLazy(navController: NavController, advice: List<Advice>, viewModel
|
|
|
) { advice ->
|
|
|
Column(
|
|
|
modifier = Modifier
|
|
|
- .fillMaxWidth(0.8f)
|
|
|
+ .fillMaxWidth(0.9f)
|
|
|
.padding(top = 10.dp)
|
|
|
- .height(175.dp)
|
|
|
+ .height(150.dp)
|
|
|
.padding(bottom = 10.dp)
|
|
|
.border(
|
|
|
width = 4.dp,
|
|
@@ -585,31 +585,30 @@ fun FoodAdviceLazy(navController: NavController, advice: List<Advice>, viewModel
|
|
|
Modifier
|
|
|
.fillMaxWidth()
|
|
|
.fillMaxHeight()
|
|
|
- .size(210.dp)
|
|
|
- .padding(top = 10.dp),
|
|
|
+ .padding(top = 10.dp, bottom = 0.dp),
|
|
|
contentAlignment = Alignment.TopCenter
|
|
|
) {
|
|
|
Text(
|
|
|
text = advice.title,
|
|
|
color = Color(0xFF510B3C),
|
|
|
- fontSize = 16.sp,
|
|
|
+ fontSize = 19.sp,
|
|
|
fontFamily = RobotoB,
|
|
|
textAlign = TextAlign.Center
|
|
|
)
|
|
|
Box(
|
|
|
Modifier
|
|
|
- .fillMaxWidth()
|
|
|
+ .fillMaxWidth(0.95f)
|
|
|
.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(
|
|
|
- verticalArrangement = Arrangement.spacedBy(10.dp)
|
|
|
+ verticalArrangement = Arrangement.spacedBy(0.dp)
|
|
|
) {
|
|
|
Text(
|
|
|
text = advice.description,
|
|
|
color = Color(0xFF510B3C),
|
|
|
- fontSize = 14.sp,
|
|
|
+ fontSize = 16.sp,
|
|
|
fontFamily = Roboto,
|
|
|
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
|
|
|
+ )
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|