|
@@ -0,0 +1,131 @@
|
|
|
+package com.example.neurea.views.screens
|
|
|
+
|
|
|
+import androidx.compose.foundation.BorderStroke
|
|
|
+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
|
|
|
+import androidx.compose.foundation.layout.Row
|
|
|
+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.size
|
|
|
+import androidx.compose.foundation.layout.width
|
|
|
+import androidx.compose.foundation.shape.CircleShape
|
|
|
+import androidx.compose.foundation.shape.RoundedCornerShape
|
|
|
+import androidx.compose.foundation.text.KeyboardOptions
|
|
|
+import androidx.compose.material3.Button
|
|
|
+import androidx.compose.material3.ButtonDefaults
|
|
|
+import androidx.compose.material3.ExperimentalMaterial3Api
|
|
|
+import androidx.compose.material3.Icon
|
|
|
+import androidx.compose.material3.IconButton
|
|
|
+import androidx.compose.material3.IconButtonDefaults
|
|
|
+import androidx.compose.material3.MaterialTheme
|
|
|
+import androidx.compose.material3.OutlinedIconButton
|
|
|
+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.clip
|
|
|
+import androidx.compose.ui.graphics.Color
|
|
|
+import androidx.compose.ui.res.painterResource
|
|
|
+import androidx.compose.ui.text.TextStyle
|
|
|
+import androidx.compose.ui.text.font.FontWeight
|
|
|
+import androidx.compose.ui.text.input.KeyboardType
|
|
|
+import androidx.compose.ui.text.style.TextAlign
|
|
|
+import androidx.compose.ui.tooling.preview.Preview
|
|
|
+import androidx.compose.ui.unit.dp
|
|
|
+import androidx.compose.ui.unit.sp
|
|
|
+import com.example.neurea.views.ui.theme.NeureaTheme
|
|
|
+import com.example.neurea.R
|
|
|
+
|
|
|
+
|
|
|
+@Preview()
|
|
|
+@OptIn(ExperimentalMaterial3Api::class)
|
|
|
+@Composable
|
|
|
+fun BookScreen() { // navController: NavController
|
|
|
+ var newName by remember{ mutableStateOf("") }
|
|
|
+ var newEmail by remember { mutableStateOf("") }
|
|
|
+ var newBirthday by remember { mutableStateOf("") }
|
|
|
+ val maxLength = 30
|
|
|
+
|
|
|
+ NeureaTheme {
|
|
|
+ Column(
|
|
|
+ modifier = Modifier
|
|
|
+ .fillMaxSize()
|
|
|
+ .background(color = MaterialTheme.colorScheme.surface)
|
|
|
+ ) {
|
|
|
+ Row(modifier = Modifier
|
|
|
+ .fillMaxWidth()
|
|
|
+ .padding(top = 50.dp, start = 30.dp, end = 30.dp), horizontalArrangement = Arrangement.SpaceBetween)
|
|
|
+ {
|
|
|
+ OutlinedIconButton(onClick = { /*TODO*/ } , modifier = Modifier.clip(CircleShape)
|
|
|
+ , //border = BorderStroke(1.dp, MaterialTheme.colorScheme.primary) ,shape = CircleShape,
|
|
|
+ colors = IconButtonDefaults.iconButtonColors(
|
|
|
+ containerColor = MaterialTheme.colorScheme.secondary
|
|
|
+ ), border = BorderStroke(1.dp, MaterialTheme.colorScheme.primary)
|
|
|
+ ) {
|
|
|
+ Icon(painter = painterResource(id = R.drawable.baseline_arrow_back_ios_new_24), contentDescription = "",tint=MaterialTheme.colorScheme.primary,
|
|
|
+ modifier = Modifier.padding(end = 5.dp))
|
|
|
+ }
|
|
|
+ Row(){
|
|
|
+ OutlinedIconButton(onClick = { /*TODO*/ } , modifier = Modifier.clip(CircleShape)
|
|
|
+ , //border = BorderStroke(1.dp, MaterialTheme.colorScheme.primary) ,shape = CircleShape,
|
|
|
+ colors = IconButtonDefaults.iconButtonColors(
|
|
|
+ containerColor = MaterialTheme.colorScheme.secondary
|
|
|
+ ), border = BorderStroke(1.dp, MaterialTheme.colorScheme.primary)
|
|
|
+ ) {
|
|
|
+ Icon(painter = painterResource(id = R.drawable.baseline_bookmark_border_24), contentDescription = "",tint=MaterialTheme.colorScheme.primary)
|
|
|
+ }
|
|
|
+ OutlinedIconButton(onClick = { /*TODO*/ } , modifier = Modifier.clip(CircleShape)
|
|
|
+ , //border = BorderStroke(1.dp, MaterialTheme.colorScheme.primary) ,shape = CircleShape,
|
|
|
+ colors = IconButtonDefaults.iconButtonColors(
|
|
|
+ containerColor = MaterialTheme.colorScheme.secondary
|
|
|
+ ), border = BorderStroke(1.dp, MaterialTheme.colorScheme.primary)
|
|
|
+ ) {
|
|
|
+ Icon(painter = painterResource(id = R.drawable.baseline_more_horiz_24), contentDescription = "",tint=MaterialTheme.colorScheme.primary)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ Column(
|
|
|
+ modifier = Modifier
|
|
|
+ .fillMaxWidth()
|
|
|
+ .height(265.dp),
|
|
|
+ verticalArrangement = Arrangement.Center,
|
|
|
+ horizontalAlignment = Alignment.CenterHorizontally
|
|
|
+
|
|
|
+ ) {
|
|
|
+ Box(modifier = Modifier.height(200.dp).width(150.dp).background(Color.Gray)){
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ Column(
|
|
|
+ modifier = Modifier
|
|
|
+ .fillMaxSize()
|
|
|
+ .clip(RoundedCornerShape(45.dp, 45.dp))
|
|
|
+ .background(color = MaterialTheme.colorScheme.secondary)
|
|
|
+ .padding(start = 20.dp, end = 20.dp)
|
|
|
+ ){
|
|
|
+ Text("Автостопом по галактике", modifier = Modifier.padding(top=25.dp, bottom = 5.dp), fontWeight = FontWeight.Bold, fontSize = 20.sp)
|
|
|
+ Text("Дуглас Адамс", fontSize = 16.sp, color = MaterialTheme.colorScheme.onSecondary)
|
|
|
+ Text("Аннотация", modifier = Modifier.padding(top=15.dp, bottom = 5.dp), fontWeight = FontWeight.Bold, fontSize = 20.sp)
|
|
|
+ Text("«Автостопом по Галактике», стартовав в качестве радиопостановки на Би-би-си, имел грандиозный успех. Одноименный роман в 1984 году возглавил список английских бестселлеров, а сам Адамс стал самым молодым писателем, получившим награду «Золотая ручка», вручаемую за 1 млн. проданных книг.\u2028Телепостановка 1982 года упрочила успех серии книг про «Автостоп», а полнометражный фильм 2005 года при бюджете в \$50 млн. дважды «отбил» расходы на экранизацию и был номинирован на 7 премий.",
|
|
|
+ textAlign = TextAlign.Justify)
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|