init
This commit is contained in:
parent
ba493bfba1
commit
d60d28827a
Binary file not shown.
@ -0,0 +1,43 @@
|
|||||||
|
package org.example.shoesapptest.common
|
||||||
|
|
||||||
|
import androidx.compose.foundation.BorderStroke
|
||||||
|
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.material.Button
|
||||||
|
import androidx.compose.material.ButtonDefaults
|
||||||
|
import androidx.compose.material.Text
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
|
import androidx.compose.ui.text.TextStyle
|
||||||
|
import androidx.compose.ui.text.font.FontFamily
|
||||||
|
import androidx.compose.ui.text.font.FontStyle
|
||||||
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
|
import androidx.compose.ui.text.platform.Font
|
||||||
|
import androidx.compose.ui.unit.dp
|
||||||
|
import androidx.compose.ui.unit.sp
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun buttonMarathon(text: String,
|
||||||
|
fontStyle: FontStyle){
|
||||||
|
Button(
|
||||||
|
modifier = Modifier.width(400.dp)
|
||||||
|
.height(100.dp)
|
||||||
|
.padding(10.dp),
|
||||||
|
shape = RoundedCornerShape(15.dp),
|
||||||
|
border = BorderStroke(2.dp, Color.LightGray),
|
||||||
|
colors = ButtonDefaults.buttonColors(
|
||||||
|
contentColor = Color.Black,
|
||||||
|
backgroundColor = Color(242, 242, 242)
|
||||||
|
),
|
||||||
|
onClick = {}
|
||||||
|
) {
|
||||||
|
Text(
|
||||||
|
text = text,
|
||||||
|
fontSize = 18.sp,
|
||||||
|
fontStyle = fontStyle
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
@ -1,18 +1,13 @@
|
|||||||
package org.example.shoesapptest
|
package org.example.shoesapptest
|
||||||
|
|
||||||
import androidx.compose.animation.AnimatedVisibility
|
|
||||||
import androidx.compose.foundation.BorderStroke
|
import androidx.compose.foundation.BorderStroke
|
||||||
import androidx.compose.foundation.Image
|
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Column
|
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.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.Button
|
import androidx.compose.material.Button
|
||||||
@ -27,18 +22,11 @@ import androidx.compose.ui.graphics.Color
|
|||||||
import androidx.compose.ui.text.font.FontFamily
|
import androidx.compose.ui.text.font.FontFamily
|
||||||
import androidx.compose.ui.text.font.FontStyle
|
import androidx.compose.ui.text.font.FontStyle
|
||||||
import androidx.compose.ui.text.style.TextAlign
|
import androidx.compose.ui.text.style.TextAlign
|
||||||
import androidx.compose.ui.unit.TextUnit
|
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import org.jetbrains.compose.resources.painterResource
|
import org.example.shoesapptest.common.buttonMarathon
|
||||||
import org.jetbrains.compose.ui.tooling.preview.Preview
|
|
||||||
|
|
||||||
import kotlinproject.composeapp.generated.resources.Res
|
|
||||||
import kotlinproject.composeapp.generated.resources._collectCommonMainDrawable0Resources
|
|
||||||
import kotlinproject.composeapp.generated.resources.compose_multiplatform
|
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@Preview
|
|
||||||
fun App() {
|
fun App() {
|
||||||
MaterialTheme {
|
MaterialTheme {
|
||||||
Scaffold(
|
Scaffold(
|
||||||
@ -52,53 +40,18 @@ fun App() {
|
|||||||
verticalArrangement = Arrangement.Center,
|
verticalArrangement = Arrangement.Center,
|
||||||
horizontalAlignment = Alignment.CenterHorizontally
|
horizontalAlignment = Alignment.CenterHorizontally
|
||||||
){
|
){
|
||||||
Button(
|
buttonMarathon("Я хочу стать бегуном", FontStyle.Normal)
|
||||||
modifier = Modifier.weight(1f).width(400.dp),
|
buttonMarathon("Я хочу стать спонсором бегуна", FontStyle.Normal)
|
||||||
shape = RoundedCornerShape(15.dp),
|
buttonMarathon("Я хочу узнать больше о событии", FontStyle.Normal)
|
||||||
border = BorderStroke(2.dp, Color.LightGray),
|
|
||||||
colors = ButtonDefaults.buttonColors(
|
|
||||||
contentColor = Color.Black,
|
|
||||||
backgroundColor = Color(242,242,242)
|
|
||||||
),
|
|
||||||
onClick = {}
|
|
||||||
){
|
|
||||||
Text("Я хочу стать бегуном", fontSize = 18.sp, fontFamily=FontFamily.Monospace)
|
|
||||||
}
|
|
||||||
Spacer(modifier = Modifier.weight(0.1f))
|
|
||||||
Button(
|
|
||||||
modifier = Modifier.weight(1f).width(400.dp),
|
|
||||||
shape = RoundedCornerShape(15.dp),
|
|
||||||
border = BorderStroke(2.dp, Color.LightGray),
|
|
||||||
onClick = {},
|
|
||||||
colors = ButtonDefaults.buttonColors(
|
|
||||||
contentColor = Color.Black,
|
|
||||||
backgroundColor = Color(242,242,242)
|
|
||||||
),
|
|
||||||
){
|
|
||||||
Text("Я хочу стать спонсором бегуна", fontSize = 18.sp, fontFamily=FontFamily.Monospace)
|
|
||||||
}
|
|
||||||
Spacer(modifier = Modifier.weight(0.1f))
|
|
||||||
Button(
|
|
||||||
modifier = Modifier.weight(1f).width(400.dp),
|
|
||||||
shape = RoundedCornerShape(15.dp),
|
|
||||||
border = BorderStroke(2.dp, Color.LightGray),
|
|
||||||
colors = ButtonDefaults.buttonColors(
|
|
||||||
contentColor = Color.Black,
|
|
||||||
backgroundColor = Color(242,242,242)
|
|
||||||
),
|
|
||||||
onClick = {}
|
|
||||||
){
|
|
||||||
Text("Я хочу узнать больше о событии", fontSize = 18.sp, fontFamily=FontFamily.Monospace)
|
|
||||||
}
|
|
||||||
MarathonEnd()
|
MarathonEnd()
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun MarathonTopBar(){
|
fun MarathonTopBar(){
|
||||||
Column(
|
Column(
|
||||||
@ -131,12 +84,13 @@ fun MarathonBottomBar(){
|
|||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun MarathonEnd(){
|
fun MarathonEnd(){
|
||||||
Row(
|
Column(
|
||||||
horizontalArrangement = Arrangement.End
|
horizontalAlignment = Alignment.End,
|
||||||
|
modifier = Modifier.fillMaxWidth()
|
||||||
) {
|
) {
|
||||||
Button(
|
Button(
|
||||||
modifier = Modifier.weight(1f).width(100.dp).height(70.dp),
|
modifier = Modifier.width(100.dp).height(100.dp),
|
||||||
shape = RoundedCornerShape(15.dp),
|
shape = RoundedCornerShape(10.dp),
|
||||||
border = BorderStroke(2.dp, Color.LightGray),
|
border = BorderStroke(2.dp, Color.LightGray),
|
||||||
colors = ButtonDefaults.buttonColors(
|
colors = ButtonDefaults.buttonColors(
|
||||||
contentColor = Color.Black,
|
contentColor = Color.Black,
|
@ -0,0 +1,67 @@
|
|||||||
|
package org.example.shoesapptest
|
||||||
|
|
||||||
|
import androidx.compose.foundation.background
|
||||||
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
|
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.padding
|
||||||
|
import androidx.compose.material.Button
|
||||||
|
import androidx.compose.material.MaterialTheme
|
||||||
|
import androidx.compose.material.Scaffold
|
||||||
|
import androidx.compose.material.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.text.font.FontStyle
|
||||||
|
import androidx.compose.ui.unit.dp
|
||||||
|
import androidx.compose.ui.unit.sp
|
||||||
|
import org.example.shoesapptest.common.buttonMarathon
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun secondScreen(){
|
||||||
|
MaterialTheme{
|
||||||
|
Scaffold(
|
||||||
|
topBar = { topBarOnSecondScreen() },
|
||||||
|
bottomBar = {bottomBarOnSecondScreen()}
|
||||||
|
) { paddingValues -> Column(
|
||||||
|
modifier = Modifier
|
||||||
|
.padding(paddingValues)
|
||||||
|
.fillMaxSize()
|
||||||
|
.padding(30.dp),
|
||||||
|
verticalArrangement = Arrangement.Center,
|
||||||
|
horizontalAlignment = Alignment.CenterHorizontally
|
||||||
|
) {
|
||||||
|
buttonMarathon("Я учавствовал ранее", FontStyle.Italic)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun topBarOnSecondScreen(){
|
||||||
|
Row(
|
||||||
|
modifier = Modifier.fillMaxWidth().background(Color.DarkGray).padding(20.dp))
|
||||||
|
{
|
||||||
|
Button(onClick = {} ){
|
||||||
|
Text("Назад")
|
||||||
|
|
||||||
|
}
|
||||||
|
Text(text=" MARATHON SKILLS 2016", color = Color.White, fontSize = 35.sp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun bottomBarOnSecondScreen(){
|
||||||
|
Column(
|
||||||
|
modifier = Modifier.fillMaxWidth().background(Color.DarkGray),
|
||||||
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
|
verticalArrangement = Arrangement.Center
|
||||||
|
){
|
||||||
|
Text(text="18 дней 9 часов и 17 минут до старта марафона!", color = Color.White)
|
||||||
|
}
|
||||||
|
}
|
1
gradlew.bat
vendored
1
gradlew.bat
vendored
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
@rem
|
@rem
|
||||||
@rem Copyright 2015 the original author or authors.
|
@rem Copyright 2015 the original author or authors.
|
||||||
@rem
|
@rem
|
||||||
|
Loading…
Reference in New Issue
Block a user