add welcome
@ -7,10 +7,15 @@ import androidx.activity.enableEdgeToEdge
|
||||
import androidx.navigation.compose.NavHost
|
||||
import androidx.navigation.compose.composable
|
||||
import androidx.navigation.compose.rememberNavController
|
||||
import com.example.appwithwin.ui.screen.signIn.RegisterAccount
|
||||
import com.example.appwithwin.ui.screen.signIn.SignInScreen
|
||||
import com.example.appwithwin.ui.theme.MatuleTheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import com.example.appwithwin.ui.screen.welcome.welcome1
|
||||
import com.example.appwithwin.ui.screen.welcome.welcome2
|
||||
import com.example.appwithwin.ui.screen.welcome.welcome3
|
||||
import com.example.appwithwin.ui.screen.welcome.welcome4
|
||||
import com.example.appwithwin.ui.screen.signIn.SignInScreen
|
||||
import com.example.appwithwin.ui.screen.signIn.RegisterAccount
|
||||
|
||||
|
||||
class MainActivity : ComponentActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
@ -29,8 +34,36 @@ fun AppNavigation() {
|
||||
val navController = rememberNavController()
|
||||
NavHost(
|
||||
navController = navController,
|
||||
startDestination = Screen.SignIn.route
|
||||
startDestination = Screen.welcome1.route
|
||||
) {
|
||||
composable(Screen.welcome1.route) {
|
||||
welcome1(
|
||||
onClick = {
|
||||
navController.navigate(Screen.welcome2.route)
|
||||
}
|
||||
)
|
||||
}
|
||||
composable(Screen.welcome2.route) {
|
||||
welcome2(
|
||||
onClick = {
|
||||
navController.navigate(Screen.welcome3.route)
|
||||
}
|
||||
)
|
||||
}
|
||||
composable(Screen.welcome3.route) {
|
||||
welcome3(
|
||||
onClick = {
|
||||
navController.navigate(Screen.welcome4.route)
|
||||
}
|
||||
)
|
||||
}
|
||||
composable(Screen.welcome4.route) {
|
||||
welcome4(
|
||||
onClick = {
|
||||
navController.navigate(Screen.SignIn.route)
|
||||
}
|
||||
)
|
||||
}
|
||||
composable(Screen.SignIn.route) {
|
||||
SignInScreen(
|
||||
onSignInClick = { },
|
||||
@ -52,4 +85,8 @@ fun AppNavigation() {
|
||||
sealed class Screen(val route: String) {
|
||||
object SignIn : Screen("signIn")
|
||||
object Register : Screen("register")
|
||||
object welcome1 : Screen("welcome1")
|
||||
object welcome2 : Screen("welcome2")
|
||||
object welcome3 : Screen("welcome3")
|
||||
object welcome4 : Screen("welcome2")
|
||||
}
|
@ -116,8 +116,6 @@ fun RegisterInContent(paddingValues: PaddingValues) {
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
|
||||
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
|
||||
CommonButton(
|
||||
|
@ -1,2 +0,0 @@
|
||||
package com.example.appwithwin.ui.screen.signIn
|
||||
|
@ -0,0 +1,67 @@
|
||||
package com.example.appwithwin.ui.screen.welcome
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material3.Scaffold
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.sp
|
||||
import kotlinx.coroutines.delay
|
||||
|
||||
@Composable
|
||||
fun welcome1(
|
||||
onClick: () -> Unit
|
||||
) {
|
||||
LaunchedEffect(Unit) {
|
||||
delay(2000)
|
||||
onClick()
|
||||
}
|
||||
Scaffold { paddingValues -> win1(paddingValues,onClick) }
|
||||
}
|
||||
@Composable
|
||||
fun win1(paddingValues: PaddingValues, onClick: () -> Unit, ) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
//.padding(paddingValues)
|
||||
.background(Color(0xFF48B2E7)),
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.padding(paddingValues)
|
||||
.background(Color(0xFF48B2E7)),
|
||||
verticalArrangement = Arrangement.Center,
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
) {
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
horizontalArrangement = Arrangement.Center
|
||||
) {
|
||||
Text(
|
||||
"MATULE",
|
||||
fontSize = 64.sp,
|
||||
color = Color.White,
|
||||
fontWeight = FontWeight.Bold,
|
||||
)
|
||||
Text(
|
||||
"ME",
|
||||
fontSize = 32.sp,
|
||||
color = Color.White
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.example.appwithwin.ui.screen.welcome
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.border
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material3.Button
|
||||
import androidx.compose.material3.ButtonDefaults
|
||||
import androidx.compose.material3.Scaffold
|
||||
import androidx.compose.material3.Text
|
||||
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.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.example.appwithwin.R
|
||||
|
||||
|
||||
@Composable
|
||||
fun welcome2(
|
||||
onClick: () -> Unit
|
||||
) {
|
||||
Scaffold{
|
||||
paddingValues -> win2(paddingValues,onClick)
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun win2(paddingValues: PaddingValues, onStart1Click: () -> Unit, ){
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
//.padding(paddingValues)
|
||||
.background(Color(0xFF48B2E7)),
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
) {
|
||||
Text("Добро пожаловать",
|
||||
fontSize = 50.sp,
|
||||
color = Color.White,
|
||||
fontWeight = FontWeight.Bold,
|
||||
textAlign = TextAlign.Center,
|
||||
modifier = Modifier
|
||||
.padding(top = 32.dp)
|
||||
//.padding(bottom = 16.dp)
|
||||
)
|
||||
Image(
|
||||
painter = painterResource(id = R.drawable.img),
|
||||
contentDescription = "Boot",
|
||||
modifier = Modifier
|
||||
.size(100.dp)
|
||||
//.padding(bottom = 16.dp)
|
||||
)
|
||||
Box{
|
||||
Image(
|
||||
painter = painterResource(id = R.drawable.boot),
|
||||
contentDescription = "Boot image",
|
||||
modifier = Modifier
|
||||
.size(500.dp)
|
||||
//.padding(bottom = 32.dp) // Отступ снизу
|
||||
)
|
||||
Image(
|
||||
painter = painterResource(id = R.drawable.back),
|
||||
contentDescription = "Boot image",
|
||||
modifier = Modifier
|
||||
.size(600.dp)
|
||||
//.padding(bottom = 32.dp) // Отступ снизу
|
||||
)
|
||||
}
|
||||
Button(
|
||||
onClick = onStart1Click,
|
||||
modifier = Modifier
|
||||
.padding(top = 50.dp)
|
||||
.background(Color.White, RoundedCornerShape(8.dp))
|
||||
.border(1.dp, Color.Gray, RoundedCornerShape(8.dp))
|
||||
.width(400.dp),
|
||||
colors = ButtonDefaults.buttonColors(
|
||||
containerColor = Color.White
|
||||
)
|
||||
) {
|
||||
Text(
|
||||
text = "Начать",
|
||||
color = Color.Black
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
package com.example.appwithwin.ui.screen.welcome
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.border
|
||||
import androidx.compose.foundation.horizontalScroll
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material3.Button
|
||||
import androidx.compose.material3.ButtonDefaults
|
||||
import androidx.compose.material3.Scaffold
|
||||
import androidx.compose.material3.Text
|
||||
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.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.example.appwithwin.R
|
||||
|
||||
|
||||
@Composable
|
||||
fun welcome3(
|
||||
onClick: () -> Unit
|
||||
) {
|
||||
Scaffold{ paddingValues -> win3(paddingValues,onClick) }
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun win3(paddingValues: PaddingValues, onClick: () -> Unit){
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
//.padding(paddingValues)
|
||||
.background(Color(0xFF48B2E7)),
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
){
|
||||
Box{
|
||||
Image(
|
||||
painter = painterResource(id = R.drawable.boot2),
|
||||
contentDescription = "Boot image",
|
||||
modifier = Modifier
|
||||
.size(500.dp)
|
||||
)
|
||||
Image(
|
||||
painter = painterResource(id = R.drawable.smiley),
|
||||
contentDescription = "Boot image",
|
||||
modifier = Modifier
|
||||
.size(100.dp)
|
||||
.align(Alignment.TopEnd)
|
||||
.padding(top = 50.dp, end = 32.dp)
|
||||
)
|
||||
Image(
|
||||
painter = painterResource(id = R.drawable.drawing1),
|
||||
contentDescription = "Boot image",
|
||||
modifier = Modifier
|
||||
.size(200.dp)
|
||||
//.align(Alignment.TopEnd)
|
||||
.padding(top = 100.dp)
|
||||
)
|
||||
}
|
||||
Text("Начнем путешествие",
|
||||
fontSize = 50.sp,
|
||||
color = Color.White,
|
||||
fontWeight = FontWeight.Bold,
|
||||
textAlign = TextAlign.Center,
|
||||
modifier = Modifier
|
||||
.padding(top = 32.dp)
|
||||
)
|
||||
Text("Умная, великолепная и модная коллекция Изучите сейчас",
|
||||
fontSize = 25.sp,
|
||||
color = Color.White,
|
||||
//fontWeight = FontWeight.Bold,
|
||||
textAlign = TextAlign.Center,
|
||||
modifier = Modifier
|
||||
.padding(top = 32.dp)
|
||||
)
|
||||
Button(
|
||||
onClick = onClick,
|
||||
modifier = Modifier
|
||||
.padding(top = 50.dp)
|
||||
.background(Color.White, RoundedCornerShape(8.dp))
|
||||
.border(1.dp, Color.Gray, RoundedCornerShape(8.dp))
|
||||
.width(400.dp),
|
||||
colors = ButtonDefaults.buttonColors(
|
||||
containerColor = Color.White
|
||||
)
|
||||
) {
|
||||
Text(
|
||||
text = "Далее",
|
||||
color = Color.Black
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
package com.example.appwithwin.ui.screen.welcome
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.border
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material3.Button
|
||||
import androidx.compose.material3.ButtonDefaults
|
||||
import androidx.compose.material3.Scaffold
|
||||
import androidx.compose.material3.Text
|
||||
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.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.example.appwithwin.R
|
||||
|
||||
|
||||
@Composable
|
||||
fun welcome4(
|
||||
onClick: () -> Unit
|
||||
) {
|
||||
Scaffold{ paddingValues -> win4(paddingValues,onClick) }
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun win4(paddingValues: PaddingValues, onClick: () -> Unit) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.background(Color(0xFF48B2E7)),
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
) {
|
||||
Box{
|
||||
Image(
|
||||
painter = painterResource(id = R.drawable.boot3),
|
||||
contentDescription = "Boot image",
|
||||
modifier = Modifier
|
||||
.size(500.dp)
|
||||
)
|
||||
Image(
|
||||
painter = painterResource(id = R.drawable.smiley),
|
||||
contentDescription = "Boot image",
|
||||
modifier = Modifier
|
||||
.size(150.dp)
|
||||
.align(Alignment.TopStart)
|
||||
.padding(top = 50.dp)
|
||||
)
|
||||
}
|
||||
Text("У вас есть сила, чтобы",
|
||||
fontSize = 50.sp,
|
||||
color = Color.White,
|
||||
fontWeight = FontWeight.Bold,
|
||||
textAlign = TextAlign.Center,
|
||||
modifier = Modifier
|
||||
.padding(top = 32.dp)
|
||||
)
|
||||
Text("В вашей комнате много красивых и привлекательных растений",
|
||||
fontSize = 25.sp,
|
||||
color = Color.White,
|
||||
//fontWeight = FontWeight.Bold,
|
||||
textAlign = TextAlign.Center,
|
||||
modifier = Modifier
|
||||
.padding(top = 32.dp)
|
||||
)
|
||||
Button(
|
||||
onClick = onClick,
|
||||
modifier = Modifier
|
||||
.padding(top = 50.dp)
|
||||
.background(Color.White, RoundedCornerShape(8.dp))
|
||||
.border(1.dp, Color.Gray, RoundedCornerShape(8.dp))
|
||||
.width(400.dp),
|
||||
colors = ButtonDefaults.buttonColors(
|
||||
containerColor = Color.White
|
||||
)
|
||||
) {
|
||||
Text(
|
||||
text = "Далее",
|
||||
color = Color.Black
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
BIN
app/src/main/res/drawable/back.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
app/src/main/res/drawable/boot.png
Normal file
After Width: | Height: | Size: 94 KiB |
BIN
app/src/main/res/drawable/boot2.png
Normal file
After Width: | Height: | Size: 73 KiB |
BIN
app/src/main/res/drawable/boot3.png
Normal file
After Width: | Height: | Size: 71 KiB |
BIN
app/src/main/res/drawable/drawing1.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/drawable/img.png
Normal file
After Width: | Height: | Size: 840 B |
BIN
app/src/main/res/drawable/shadow.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
BIN
app/src/main/res/drawable/smiley.png
Normal file
After Width: | Height: | Size: 630 B |