parent
51f7c046ce
commit
ac819c7169
@ -0,0 +1,139 @@
|
|||||||
|
package com.iqball.app.page
|
||||||
|
|
||||||
|
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.Row
|
||||||
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
|
import androidx.compose.material3.Divider
|
||||||
|
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.graphics.RectangleShape
|
||||||
|
import androidx.compose.ui.graphics.Shape
|
||||||
|
import androidx.compose.ui.res.stringResource
|
||||||
|
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.iqball.app.R
|
||||||
|
import com.iqball.app.ui.theme.Orange
|
||||||
|
|
||||||
|
@Preview
|
||||||
|
@Composable
|
||||||
|
fun DisplayHomePage() {
|
||||||
|
HomePage()
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun HomePage() {
|
||||||
|
Column {
|
||||||
|
AppHeader()
|
||||||
|
PersonalSpace()
|
||||||
|
PersonalSpaceMenu()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun AppHeader() {
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.background(Color.DarkGray)
|
||||||
|
.fillMaxWidth(),
|
||||||
|
contentAlignment = Alignment.Center
|
||||||
|
) {
|
||||||
|
Row {
|
||||||
|
Text(
|
||||||
|
text = stringResource(R.string.app_name),
|
||||||
|
color = Orange,
|
||||||
|
fontWeight = FontWeight.Bold,
|
||||||
|
fontSize = 25.sp
|
||||||
|
)
|
||||||
|
//rajouter petit bonhomme avec le nom
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun PersonalSpace() {
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.background(Color.Gray)
|
||||||
|
.fillMaxWidth(),
|
||||||
|
contentAlignment = Alignment.Center
|
||||||
|
) {
|
||||||
|
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
||||||
|
Text(
|
||||||
|
text = stringResource(R.string.espace_personnel),
|
||||||
|
color = Color.White,
|
||||||
|
fontWeight = FontWeight.Bold,
|
||||||
|
fontSize = 15.sp,
|
||||||
|
modifier = Modifier.padding(5.dp)
|
||||||
|
)
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.border(2.dp, Color.Black, RoundedCornerShape(5.dp))
|
||||||
|
.fillMaxWidth(),
|
||||||
|
contentAlignment = Alignment.Center
|
||||||
|
) {
|
||||||
|
Text(
|
||||||
|
text = "Aucune tactique créée !",
|
||||||
|
fontSize = 10.sp,
|
||||||
|
modifier = Modifier.padding(5.dp)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun PersonalSpaceMenu() {
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxSize()
|
||||||
|
.background(Color.LightGray)
|
||||||
|
) {
|
||||||
|
Column {
|
||||||
|
Row {
|
||||||
|
Row {
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.background(Color.DarkGray)
|
||||||
|
.padding(5.dp)
|
||||||
|
) {
|
||||||
|
Text(text = "Mes équipes")
|
||||||
|
}
|
||||||
|
Divider(
|
||||||
|
modifier = Modifier.align(Alignment.Bottom),
|
||||||
|
color = Color.DarkGray,
|
||||||
|
thickness = 3.dp
|
||||||
|
)
|
||||||
|
//ajouter button add si jamais on fait ajout team en android
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
Row {
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.background(Color.DarkGray)
|
||||||
|
.padding(5.dp)
|
||||||
|
) {
|
||||||
|
Text(text = "Mes dernières stratégies")
|
||||||
|
}
|
||||||
|
Divider(
|
||||||
|
modifier = Modifier.align(Alignment.Bottom),
|
||||||
|
color = Color.DarkGray,
|
||||||
|
thickness = 3.dp
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,3 +1,4 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">IQBall</string>
|
<string name="app_name">IQBall</string>
|
||||||
|
<string name="espace_personnel">Espace Personnel</string>
|
||||||
</resources>
|
</resources>
|
Loading…
Reference in new issue