Explorar o código

update MainMenuScreen

КурносовИН hai 3 días
pai
achega
f087957544

+ 54 - 15
Project/app/src/main/java/com/example/mygymapp/view/mainActivity/components/MainMenuScreen.kt

@@ -2,6 +2,7 @@ package com.example.mygymapp.view.mainActivity.components
 
 import androidx.compose.foundation.Image
 import androidx.compose.foundation.background
+import androidx.compose.foundation.border
 import androidx.compose.foundation.layout.Arrangement
 import androidx.compose.foundation.layout.Box
 import androidx.compose.foundation.layout.Column
@@ -10,16 +11,21 @@ import androidx.compose.foundation.layout.fillMaxWidth
 import androidx.compose.foundation.layout.padding
 import androidx.compose.foundation.layout.size
 import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material3.Text
+import androidx.compose.material3.rememberSwipeToDismissBoxState
 import androidx.compose.runtime.Composable
 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.tooling.preview.Preview
 import androidx.compose.ui.unit.dp
+import androidx.compose.ui.unit.sp
 import androidx.navigation.NavHostController
 import com.example.mygymapp.R
 import com.example.mygymapp.ui.theme.BlueBlack
 import com.example.mygymapp.ui.theme.BlueDark
+import com.example.mygymapp.ui.theme.chivoFontFamily
 
 @Preview
 @Composable
@@ -28,12 +34,12 @@ fun MainMenuScreen()
     Column(
         Modifier
             .background(color = BlueBlack)
-            .padding(top = 50.dp, start = 15.dp, end = 15.dp),
-        verticalArrangement = Arrangement.Top,
+            .padding(start = 15.dp, end = 15.dp)
+            .border(1.dp, Color.Black),
+        verticalArrangement = Arrangement.Center,
         horizontalAlignment = Alignment.CenterHorizontally,
     ){
         Box(modifier = Modifier
-            .padding()
             .size(width = 325.dp, height = 150.dp)
             .background(color = BlueDark, shape = RoundedCornerShape(25.dp))
                 ) {
@@ -45,26 +51,59 @@ fun MainMenuScreen()
                     .size(90.dp),
             )
         }
+        Text(
+            text = "Абонементы", fontSize = 24.sp, color = Color(0xFFFefcfb),
+            fontFamily = chivoFontFamily,
+            modifier = Modifier.padding(top = 10.dp)
+        )
 
         Row(
             horizontalArrangement = Arrangement.SpaceBetween,
             verticalAlignment = Alignment.CenterVertically,
         ) {
-            Box(modifier = Modifier
-                .padding(top = 40.dp)
-                .size(width = 150.dp, height = 150.dp)
-                .background(color = BlueDark, shape = RoundedCornerShape(25.dp))
-            ) {
+            Box(){
+                Box(modifier = Modifier
+                    .padding(top = 40.dp)
+                    .size(width = 150.dp, height = 150.dp)
+                    .background(color = BlueDark, shape = RoundedCornerShape(25.dp))
+                ) {
+                    Image(
+                        painter = painterResource(R.drawable.users),
+                        contentDescription = "",
+                        modifier = Modifier
+                            .align(alignment = Alignment.Center)
+                            .size(70.dp))
+                }
+                Text(
+                    text = "Тренеры", fontSize = 24.sp, color = Color(0xFFFefcfb),
+                    fontFamily = chivoFontFamily,
+                    modifier = Modifier
+                        .padding(top = 200.dp)
+                        .align(alignment = Alignment.Center)
+                )
             }
 
-            Box(modifier = Modifier
-                .padding(top = 40.dp, start = 25.dp)
-                .size(width = 150.dp, height = 150.dp)
-                .background(color = BlueDark, shape = RoundedCornerShape(25.dp))
-            ) {
+            Box(){
+                Box(modifier = Modifier
+                    .padding(start = 25.dp,)
+                    .size(width = 150.dp, height = 150.dp)
+                    .background(color = BlueDark, shape = RoundedCornerShape(25.dp))
+                ) {
+                    Image(
+                        painter = painterResource(R.drawable.clock),
+                        contentDescription = "",
+                        modifier = Modifier
+                            .align(alignment = Alignment.Center)
+                            .size(75.dp))
+                }
+                Text(
+                    text = "Расписание", fontSize = 24.sp, color = Color(0xFFFefcfb),
+                    fontFamily = chivoFontFamily,
+                    modifier = Modifier
+                        .padding(top = 200.dp)
+                        .align(alignment = Alignment.Center)
+                )
             }
         }
-
-
     }
 }

BIN=BIN
Project/app/src/main/res/drawable/clock.png