|
@@ -1,45 +1,140 @@
|
|
|
package com.example.mystictale.Screen
|
|
|
|
|
|
import androidx.compose.foundation.Image
|
|
|
+import androidx.compose.foundation.layout.Arrangement
|
|
|
+import androidx.compose.foundation.layout.Box
|
|
|
import androidx.compose.foundation.layout.Column
|
|
|
import androidx.compose.foundation.layout.Row
|
|
|
+import androidx.compose.foundation.layout.Spacer
|
|
|
import androidx.compose.foundation.layout.fillMaxSize
|
|
|
+import androidx.compose.foundation.layout.fillMaxWidth
|
|
|
+import androidx.compose.foundation.layout.height
|
|
|
+import androidx.compose.foundation.layout.padding
|
|
|
+import androidx.compose.foundation.layout.width
|
|
|
+import androidx.compose.foundation.shape.RoundedCornerShape
|
|
|
import androidx.compose.material3.Button
|
|
|
-import androidx.compose.material3.CircularProgressIndicator
|
|
|
+import androidx.compose.material3.ButtonColors
|
|
|
+import androidx.compose.material3.LinearProgressIndicator
|
|
|
+import androidx.compose.material3.MaterialTheme
|
|
|
+import androidx.compose.material3.Text
|
|
|
+import androidx.compose.material3.TextField
|
|
|
+import androidx.compose.material3.TextFieldDefaults
|
|
|
import androidx.compose.runtime.Composable
|
|
|
-import androidx.compose.runtime.getValue
|
|
|
import androidx.compose.runtime.mutableStateOf
|
|
|
import androidx.compose.runtime.remember
|
|
|
-import androidx.compose.runtime.setValue
|
|
|
+import androidx.compose.ui.Alignment
|
|
|
import androidx.compose.ui.Modifier
|
|
|
import androidx.compose.ui.draw.paint
|
|
|
+import androidx.compose.ui.graphics.Color
|
|
|
+import androidx.compose.ui.graphics.StrokeCap
|
|
|
+import androidx.compose.ui.layout.ContentScale
|
|
|
import androidx.compose.ui.res.painterResource
|
|
|
+import androidx.compose.ui.text.TextStyle
|
|
|
+import androidx.compose.ui.text.font.FontWeight
|
|
|
+import androidx.compose.ui.tooling.preview.Preview
|
|
|
+import androidx.compose.ui.unit.dp
|
|
|
+import androidx.compose.ui.unit.sp
|
|
|
import com.example.mystictale.R
|
|
|
+import com.example.mystictale.resources.GenericTextField
|
|
|
+import com.example.mystictale.ui.theme.DarkPurple
|
|
|
+import com.example.mystictale.ui.theme.OpenSans
|
|
|
|
|
|
+@Preview
|
|
|
@Composable
|
|
|
fun RegistrationEmail() {
|
|
|
- var currentProgress by remember { mutableStateOf(0f) }
|
|
|
+ val email = remember {
|
|
|
+ mutableStateOf("")
|
|
|
+ }
|
|
|
Column(
|
|
|
Modifier
|
|
|
.fillMaxSize()
|
|
|
.paint(
|
|
|
- painterResource(id = R.drawable.background)
|
|
|
+ painterResource(id = R.drawable.background),
|
|
|
+ contentScale = ContentScale.FillBounds
|
|
|
)
|
|
|
+ .padding(10.dp),
|
|
|
+ verticalArrangement = Arrangement.SpaceBetween,
|
|
|
+ horizontalAlignment = Alignment.CenterHorizontally
|
|
|
) {
|
|
|
- Row {
|
|
|
- Button(onClick = { /*TODO*/ }) {
|
|
|
- Image(
|
|
|
- painter = painterResource(id = R.drawable.back),
|
|
|
- contentDescription = "back to start page"
|
|
|
- )
|
|
|
- CircularProgressIndicator(progress = currentProgress)
|
|
|
-
|
|
|
-
|
|
|
- Button(onClick = {currentProgress = currentProgress+25f}) {
|
|
|
-
|
|
|
+
|
|
|
+ Column {
|
|
|
+ Box(
|
|
|
+ modifier = Modifier
|
|
|
+ .padding(top = 30.dp),
|
|
|
+ contentAlignment = Alignment.TopStart
|
|
|
+ ) {
|
|
|
+ Button(
|
|
|
+ onClick = { /*TODO*/ }, colors = ButtonColors(
|
|
|
+ disabledContentColor = Color.White,
|
|
|
+ disabledContainerColor = Color.Transparent,
|
|
|
+ contentColor = Color.White,
|
|
|
+ containerColor = Color.Transparent
|
|
|
+ )
|
|
|
+ ) {
|
|
|
+ Image(
|
|
|
+ painter = painterResource(id = R.drawable.back),
|
|
|
+ contentDescription = "back",
|
|
|
+ modifier = Modifier
|
|
|
+ .width(11.dp)
|
|
|
+ .height(14.dp)
|
|
|
+ )
|
|
|
+ }
|
|
|
+ Row(
|
|
|
+ modifier = Modifier
|
|
|
+ .fillMaxWidth()
|
|
|
+ .padding(top = 22.dp),
|
|
|
+ horizontalArrangement = Arrangement.Center,
|
|
|
+ verticalAlignment = Alignment.CenterVertically
|
|
|
+ ) {
|
|
|
+
|
|
|
+
|
|
|
+ LinearProgressIndicator(
|
|
|
+ progress = 0.2f,
|
|
|
+ modifier = Modifier.width(157.dp),
|
|
|
+ strokeCap = StrokeCap.Round,
|
|
|
+ trackColor = Color(0xFFA1A0A3),
|
|
|
+ color = Color(0xFF28176B)
|
|
|
+ )
|
|
|
}
|
|
|
}
|
|
|
+ Spacer(modifier = Modifier.height(30.dp))
|
|
|
+ Text(
|
|
|
+ text = "Ваша электронная почта",
|
|
|
+ fontWeight = FontWeight.Bold,
|
|
|
+ fontFamily = OpenSans,
|
|
|
+ fontSize = 30.sp,
|
|
|
+ color = Color.White,
|
|
|
+ modifier = Modifier
|
|
|
+ .fillMaxWidth(0.9f)
|
|
|
+ .padding(start = 40.dp),
|
|
|
+ style = MaterialTheme.typography.headlineMedium
|
|
|
+ )
|
|
|
+ Spacer(modifier = Modifier.height(30.dp))
|
|
|
+
|
|
|
+ GenericTextField(email.value,{email.value = it},"E-mail" )
|
|
|
+ }
|
|
|
+
|
|
|
+ Box(Modifier.padding(bottom = 40.dp)){
|
|
|
+ Button(
|
|
|
+ onClick = { /*TODO*/ },
|
|
|
+ modifier = Modifier
|
|
|
+ .width(290.dp)
|
|
|
+ .height(48.dp),
|
|
|
+ shape = RoundedCornerShape(12.dp),
|
|
|
+ colors = ButtonColors(
|
|
|
+ containerColor = DarkPurple,
|
|
|
+ contentColor = Color.White,
|
|
|
+ disabledContentColor = Color.White,
|
|
|
+ disabledContainerColor = DarkPurple
|
|
|
+ )
|
|
|
+ ) {
|
|
|
+ Text("Далее", fontSize = 20.sp, fontWeight = FontWeight.Bold)
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
+
|
|
|
}
|
|
|
-}
|
|
|
+
|
|
|
+}
|