pull/3/head
Arthur VALIN 1 year ago
parent 7a50efc19c
commit bd40bed949

@ -7,11 +7,11 @@
<deviceKey>
<Key>
<type value="VIRTUAL_DEVICE_PATH" />
<value value="C:\Users\Siph9\.android\avd\pixel_5_-_api_33.avd" />
<value value="C:\Users\Siph9\.android\avd\Pixel_4_XL_API_33.avd" />
</Key>
</deviceKey>
</Target>
</targetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2023-09-18T13:33:44.995752500Z" />
<timeTargetWasSelectedWithDropDown value="2023-09-19T09:48:09.318429700Z" />
</component>
</project>

@ -63,4 +63,8 @@ dependencies {
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version"
}
implementation 'com.github.racra:smooth-corner-rect-android-compose:v1.0.0'
implementation "com.google.accompanist:accompanist-systemuicontroller:$accompanist_version"
}

@ -3,6 +3,7 @@ package fr.iut.alldev.allin
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import com.google.accompanist.systemuicontroller.rememberSystemUiController
import fr.iut.alldev.allin.ui.navigation.drawer.AllInDrawer
import fr.iut.alldev.allin.ui.theme.AllInTheme
@ -10,10 +11,17 @@ class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
AllInTheme {
val systemUiController = rememberSystemUiController()
AllInTheme{
systemUiController.setStatusBarColor(AllInTheme.colors.allIn_Dark)
systemUiController.setNavigationBarColor(AllInTheme.colors.allIn_White)
systemUiController.isNavigationBarVisible = false
systemUiController.isStatusBarVisible = false
AllInDrawer()
}
}
}
}

@ -2,7 +2,7 @@ package fr.iut.alldev.allin.ui.core
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.shape.AbsoluteRoundedCornerShape
import androidx.compose.material3.Card
import androidx.compose.material3.CardDefaults
import androidx.compose.material3.ExperimentalMaterial3Api
@ -21,7 +21,7 @@ fun AllInCard(
radius: Int = 15,
backgroundColor: Color = AllInTheme.colors.white,
borderWidth: Dp? = null,
borderColor: Color = AllInTheme.colors.allIn_LightestGrey,
borderColor: Color = AllInTheme.colors.allIn_LightGrey100,
borderBrush: Brush? = null,
content: @Composable ()->Unit
) {
@ -29,7 +29,7 @@ fun AllInCard(
Card(
modifier = modifier.fillMaxWidth(),
onClick = it,
shape = RoundedCornerShape(radius),
shape = AbsoluteRoundedCornerShape(radius),
border = borderWidth?.let{ width -> borderBrush?.let{BorderStroke(width, it)} ?: BorderStroke(width, borderColor)},
colors = CardDefaults.cardColors(containerColor = backgroundColor)
) {
@ -38,7 +38,7 @@ fun AllInCard(
} ?: run {
Card(
modifier = modifier.fillMaxWidth(),
shape = RoundedCornerShape(radius),
shape = AbsoluteRoundedCornerShape(radius),
border = borderWidth?.let{ width -> borderBrush?.let{BorderStroke(width, it)} ?: BorderStroke(width, borderColor)},
colors = CardDefaults.cardColors(containerColor = backgroundColor)
) {

@ -10,7 +10,6 @@ import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
@ -28,7 +27,7 @@ fun AllInChip(
modifier = modifier.wrapContentSize(),
shape = RoundedCornerShape(50),
onClick = onClick,
border = if(!isSelected) BorderStroke(1.dp, AllInTheme.colors.allIn_LightestGrey) else null,
border = if(!isSelected) BorderStroke(1.dp, AllInTheme.colors.allIn_LightGrey100) else null,
colors = CardDefaults.cardColors(containerColor = with(AllInTheme.colors){
if(isSelected) allIn_Purple else white
})
@ -37,9 +36,11 @@ fun AllInChip(
text = text,
modifier = Modifier.padding(vertical = 8.dp, horizontal = 22.dp),
textAlign = TextAlign.Center,
fontWeight = if(isSelected) FontWeight.W800 else null,
style = with(AllInTheme.typography) {
if (isSelected) h1 else r
},
color = with(AllInTheme.colors){
if(isSelected) white else allIn_LightGrey
if(isSelected) white else allIn_LightGrey300
}
)
@ -49,11 +50,15 @@ fun AllInChip(
@Preview
@Composable
private fun AllInChipPreviewUnselected() {
AllInChip("Public", false)
AllInTheme {
AllInChip("Public", false)
}
}
@Preview
@Composable
private fun AllInChipPreviewSelected() {
AllInChip("Public", true)
AllInTheme {
AllInChip("Public", true)
}
}

@ -1,26 +1,28 @@
package fr.iut.alldev.allin.ui.core
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Camera
import androidx.compose.material.icons.filled.PhotoCamera
import androidx.compose.material3.Card
import androidx.compose.material3.CardDefaults
import androidx.compose.material3.Icon
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import fr.iut.alldev.allin.ui.theme.AllInTheme
@Composable
@Preview
fun ProfilePicture(
image: Painter? = null,
borderWidth: Dp? = null,
size: Dp = 80.dp,
modifier: Modifier = Modifier
@ -28,13 +30,33 @@ fun ProfilePicture(
Card(
modifier = modifier.size(size),
shape = RoundedCornerShape(100),
colors = CardDefaults.cardColors(containerColor = AllInTheme.colors.allIn_DarkerGrey),
border = borderWidth?.let{BorderStroke(it, AllInTheme.colors.allIn_DarkGrey)}
colors = CardDefaults.cardColors(containerColor = AllInTheme.colors.allIn_DarkGrey100),
border = borderWidth?.let{BorderStroke(it, AllInTheme.colors.allIn_DarkGrey50)}
) {
Box(Modifier.fillMaxSize()) {
Icon(imageVector = Icons.Filled.Camera,
contentDescription = null,
modifier = Modifier.align(Alignment.Center))
image?.let {
Image(
painter = it,
contentDescription = null,
modifier = Modifier.align(Alignment.Center).fillMaxSize()
)
} ?: run{
Icon(
imageVector = Icons.Default.PhotoCamera,
tint = AllInTheme.colors.white,
contentDescription = null,
modifier = Modifier.align(Alignment.Center).fillMaxSize(0.5f)
)
}
}
}
}
@Preview
@Composable
private fun ProfilePictureDefaultPreview() {
AllInTheme {
ProfilePicture()
}
}

@ -5,8 +5,6 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
@ -23,10 +21,13 @@ fun RainbowButton(
Text(
text = text,
textAlign = TextAlign.Center,
fontWeight = FontWeight.W700,
style = AllInTheme.typography.h2.copy(
brush = AllInTheme.colors.allIn_TextGradient
),
fontSize = 30.sp,
style = TextStyle(brush = AllInTheme.colors.allIn_TextGradient),
modifier = Modifier.padding(vertical = 20.dp).fillMaxWidth(),
modifier = Modifier
.padding(vertical = 20.dp)
.fillMaxWidth(),
)
}
}
@ -34,5 +35,7 @@ fun RainbowButton(
@Preview
@Composable
private fun RainbowButtonPreview() {
RainbowButton(text = "Participer", onClick = { })
AllInTheme {
RainbowButton(text = "Participer", onClick = { })
}
}

@ -5,33 +5,34 @@ import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ShoppingCart
import androidx.compose.material3.Card
import androidx.compose.material3.Icon
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import fr.iut.alldev.allin.R
import fr.iut.alldev.allin.ui.theme.AllInTheme
@Composable
fun CoinCounter(amount:Int, modifier: Modifier = Modifier) {
Card(modifier = modifier.wrapContentSize(), shape = RoundedCornerShape(topStartPercent = 50, bottomStartPercent = 50)) {
Row(modifier = Modifier.background(AllInTheme.colors.white)
Row(modifier = Modifier
.background(AllInTheme.colors.white)
.padding(horizontal = 13.dp, vertical = 5.dp),
verticalAlignment = Alignment.CenterVertically) {
Icon(Icons.Default.ShoppingCart,
tint = AllInTheme.colors.allIn_Dark,
Icon(
painter = painterResource(R.drawable.allcoin),
tint = AllInTheme.colors.allIn_Blue,
contentDescription = null,
modifier = Modifier.padding(end = 8.dp))
Text(text = amount.toString(),
color = AllInTheme.colors.allIn_Dark,
fontWeight = FontWeight.W800,
style = AllInTheme.typography.h1,
fontSize = 20.sp)
}
}
@ -40,5 +41,7 @@ fun CoinCounter(amount:Int, modifier: Modifier = Modifier) {
@Preview
@Composable
private fun CoinCounterPreview() {
CoinCounter(547)
AllInTheme {
CoinCounter(547)
}
}

@ -2,17 +2,16 @@ package fr.iut.alldev.allin.ui.core.topbar
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Menu
import androidx.compose.material.icons.filled.Star
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
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.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import fr.iut.alldev.allin.R
import fr.iut.alldev.allin.ui.theme.AllInTheme
@Composable
@ -20,25 +19,44 @@ fun AllInTopBar(
onMenuClicked: ()->Unit,
coinAmount: Int
) {
Box(modifier = Modifier.height(86.dp).fillMaxWidth()
.background(brush = AllInTheme.colors.allIn_MainGradient)) {
IconButton(onClick = onMenuClicked,
modifier = Modifier.align(Alignment.CenterStart)) {
Icon(Icons.Default.Menu,
Box(
modifier = Modifier
.height(86.dp)
.fillMaxWidth()
.background(brush = AllInTheme.colors.allIn_MainGradient)
) {
IconButton(
onClick = onMenuClicked,
modifier = Modifier
.padding(start = 19.dp)
.align(Alignment.CenterStart)
) {
Icon(
painterResource(id = R.drawable.allin_menu),
modifier = Modifier.size(32.dp),
contentDescription = null,
tint = Color.White)
}
Icon(Icons.Default.Star,
Icon(
painter = painterResource(R.drawable.allin),
contentDescription = null,
tint = AllInTheme.colors.white,
modifier = Modifier.size(50.dp)
.align(Alignment.Center))
CoinCounter(amount = coinAmount, modifier = Modifier.align(Alignment.CenterEnd))
modifier = Modifier
.size(40.dp)
.align(Alignment.Center)
)
CoinCounter(
amount = coinAmount,
modifier = Modifier
.align(Alignment.CenterEnd)
)
}
}
@Preview
@Composable
private fun AllInTopBarPreview(){
AllInTopBar(onMenuClicked = { }, coinAmount = 541)
AllInTheme {
AllInTopBar(onMenuClicked = { }, coinAmount = 541)
}
}

@ -2,9 +2,11 @@ package fr.iut.alldev.allin.ui.home.components
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.material.ripple.LocalRippleTheme
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.ui.Alignment
import androidx.compose.ui.Alignment.Companion.CenterEnd
import androidx.compose.ui.Alignment.Companion.CenterHorizontally
@ -17,6 +19,7 @@ import androidx.compose.ui.zIndex
import fr.iut.alldev.allin.ui.core.AllInCard
import fr.iut.alldev.allin.ui.core.ProfilePicture
import fr.iut.alldev.allin.ui.core.RainbowButton
import fr.iut.alldev.allin.ui.theme.AllInRippleTheme
import fr.iut.alldev.allin.ui.theme.AllInTheme
@Composable
@ -31,6 +34,7 @@ fun HomeBetCard(
onClickParticipate: ()->Unit
) {
AllInCard(
modifier = modifier,
radius = 7
){
Column(Modifier.fillMaxWidth()) {
@ -39,27 +43,29 @@ fun HomeBetCard(
.align(Alignment.End)
.padding(top = 12.dp, end = 10.dp)) {
Text(
fontSize = 10.sp,
fontSize = 12.sp,
text = "proposé par ",
color = AllInTheme.colors.allIn_LightGrey
style = AllInTheme.typography.s,
color = AllInTheme.colors.allIn_LightGrey300
)
Text(
fontSize = 10.sp,
fontSize = 12.sp,
text = creator,
fontWeight = FontWeight.W600
fontWeight = FontWeight.W600,
style = AllInTheme.typography.m
)
}
Column(Modifier.padding(horizontal = 19.dp, vertical = 11.dp)) {
Text(
text = category,
fontSize = 15.sp,
color = AllInTheme.colors.allIn_LightGrey,
color = AllInTheme.colors.allIn_LightGrey300,
style = AllInTheme.typography.m
)
Text(
text = title,
fontSize = 20.sp,
fontWeight = FontWeight.W800
style = AllInTheme.typography.h1
)
Spacer(modifier = Modifier.height(11.dp))
Row(
@ -68,7 +74,8 @@ fun HomeBetCard(
Text(
text = "Commence le",
fontSize = 15.sp,
color = AllInTheme.colors.allIn_LightGrey,
style = AllInTheme.typography.m,
color = AllInTheme.colors.allIn_LightGrey300,
)
HomeBetCardDateTimeChip(
text = date,
@ -79,11 +86,11 @@ fun HomeBetCard(
}
HorizontalDivider(
thickness = 1.dp,
color = AllInTheme.colors.allIn_LightestGrey
color = AllInTheme.colors.allIn_LightGrey100
)
Column(
Modifier
.background(AllInTheme.colors.allIn_LightestestGrey)
.background(AllInTheme.colors.allIn_LightGrey50)
) {
Row(
modifier = Modifier
@ -108,31 +115,36 @@ fun HomeBetCard(
Spacer(modifier = Modifier.width(12.dp))
Text(
text = "$nbPlayer joueurs en attente",
color = AllInTheme.colors.allIn_LightGrey
style = AllInTheme.typography.m,
color = AllInTheme.colors.allIn_LightGrey300
)
}
CompositionLocalProvider(
LocalRippleTheme provides AllInRippleTheme,
){
RainbowButton(
modifier = Modifier.padding(6.dp),
text = "Participer",
onClick = onClickParticipate
)
}
RainbowButton(
modifier = Modifier.padding(6.dp),
text = "Participer",
onClick = onClickParticipate
)
}
}
}
}
@Preview
@Composable
private fun HomeBetCardPreview() {
HomeBetCard(
creator = "Lucas",
category = "Études",
title = "Emre va réussir son TP de CI/CD mercredi?",
date = "12 Sept.",
time = "13:00",
nbPlayer = 4,
onClickParticipate = {}
)
AllInTheme {
HomeBetCard(
creator = "Lucas",
category = "Études",
title = "Emre va réussir son TP de CI/CD mercredi?",
date = "12 Sept.",
time = "13:00",
nbPlayer = 4,
onClickParticipate = {}
)
}
}

@ -22,12 +22,13 @@ fun HomeBetCardDateTimeChip(
Card(
modifier = modifier.wrapContentSize(),
shape = RoundedCornerShape(50),
border = BorderStroke(1.dp, AllInTheme.colors.allIn_LightestGrey),
border = BorderStroke(1.dp, AllInTheme.colors.allIn_LightGrey100),
colors = CardDefaults.cardColors(containerColor = AllInTheme.colors.white)
) {
Text(
text = text,
modifier = Modifier.padding(vertical = 8.dp, horizontal = 16.dp),
style = AllInTheme.typography.h3,
textAlign = TextAlign.Center,
color = AllInTheme.colors.allIn_Purple
)
@ -37,5 +38,7 @@ fun HomeBetCardDateTimeChip(
@Preview
@Composable
private fun HomeBetCardDateTimeChipPreview() {
HomeBetCardDateTimeChip("11 Sept.")
AllInTheme {
HomeBetCardDateTimeChip("11 Sept.")
}
}

@ -1,22 +1,18 @@
package fr.iut.alldev.allin.ui.home.components
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.LocalFireDepartment
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.AbsoluteRoundedCornerShape
import androidx.compose.material3.Icon
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.shadow
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import fr.iut.alldev.allin.R
import fr.iut.alldev.allin.ui.core.AllInCard
import fr.iut.alldev.allin.ui.theme.AllInTheme
@ -27,47 +23,71 @@ fun HomePopularCards(
title: String,
modifier: Modifier = Modifier
) {
AllInCard(
modifier = modifier.fillMaxWidth()
.padding(6.dp)
.shadow(elevation = 6.dp, shape = RoundedCornerShape(15)),
backgroundColor = AllInTheme.colors.allIn_Dark,
borderWidth = 2.dp,
borderBrush = AllInTheme.colors.allIn_MainGradient
) {
Column(modifier = Modifier.padding(13.dp)) {
Row(verticalAlignment = Alignment.CenterVertically) {
Icon(imageVector = Icons.Filled.LocalFireDepartment,
contentDescription = null,
tint = AllInTheme.colors.allIn_Pink)
Text(text = "Populaire",
color = AllInTheme.colors.allIn_Pink,
fontSize = 15.sp,
fontWeight = FontWeight.W700
Box(modifier.padding(3.dp)) {
AllInCard(
modifier = Modifier
.fillMaxWidth()
.shadow(
elevation = 2.dp,
shape = AbsoluteRoundedCornerShape(15)
)
.padding(2.dp),
backgroundColor = AllInTheme.colors.allIn_Dark,
borderWidth = 2.dp,
borderBrush = AllInTheme.colors.allIn_MainGradient
) {
Column(modifier = Modifier.padding(13.dp)) {
Row(verticalAlignment = Alignment.CenterVertically) {
Icon(
painter = painterResource(id = R.drawable.allin_fire),
modifier = Modifier.size(20.dp),
contentDescription = null,
tint = AllInTheme.colors.allIn_Pink
)
}
Text(text = title,
color = AllInTheme.colors.white,
fontSize = 20.sp,
fontWeight = FontWeight.W800,
modifier = Modifier.padding(vertical = 22.dp))
Row(modifier = Modifier.align(alignment = Alignment.CenterHorizontally)) {
Text(text = nbPlayers.toString(),
color = AllInTheme.colors.allIn_Pink,
fontSize = 15.sp,
fontWeight = FontWeight.W700)
Text(text = " joueurs - ",
Spacer(modifier = Modifier.width(3.dp))
Text(
text = "Populaire",
color = AllInTheme.colors.allIn_Pink,
fontSize = 17.sp,
style = AllInTheme.typography.h2
)
}
Text(
text = title,
color = AllInTheme.colors.white,
fontSize = 15.sp)
fontSize = 20.sp,
style = AllInTheme.typography.h1,
modifier = Modifier.padding(vertical = 22.dp)
)
Row(modifier = Modifier.align(alignment = Alignment.CenterHorizontally)) {
Text(
text = nbPlayers.toString(),
color = AllInTheme.colors.allIn_Pink,
fontSize = 15.sp,
style = AllInTheme.typography.h2
)
Text(
text = " joueurs - ",
color = AllInTheme.colors.white,
style = AllInTheme.typography.r,
fontSize = 15.sp
)
Text(text = points,
color = AllInTheme.colors.allIn_Pink,
fontSize = 15.sp,
fontWeight = FontWeight.W700)
Text(text = " points en jeu",
color = AllInTheme.colors.white,
fontSize = 15.sp)
Text(
text = points,
color = AllInTheme.colors.allIn_Pink,
fontSize = 15.sp,
style = AllInTheme.typography.h2
)
Text(
text = " points en jeu",
color = AllInTheme.colors.white,
style = AllInTheme.typography.r,
fontSize = 15.sp
)
}
}
}
}
}
@ -75,5 +95,7 @@ fun HomePopularCards(
@Preview
@Composable
private fun HomePopularCardsPreview() {
HomePopularCards(nbPlayers = 12, points = "2.35k", title = "Emre va réussir son TP de CI/CD mercredi?")
AllInTheme {
HomePopularCards(nbPlayers = 12, points = "2.35k", title = "Emre va réussir son TP de CI/CD mercredi?")
}
}

@ -1,62 +1,78 @@
package fr.iut.alldev.allin.ui.home
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.LazyRow
import androidx.compose.foundation.lazy.items
import androidx.compose.runtime.*
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import fr.iut.alldev.allin.ui.core.AllInChip
import fr.iut.alldev.allin.ui.home.components.HomeBetCard
import fr.iut.alldev.allin.ui.home.components.HomePopularCards
import fr.iut.alldev.allin.ui.theme.AllInTheme
@OptIn(ExperimentalFoundationApi::class)
@Composable
@Preview
fun Home(){
val horizontalPadding = 23.dp
Column {
HomePopularCards(
modifier = Modifier
.padding(horizontal = horizontalPadding)
.padding(top = 23.dp),
nbPlayers = 12,
points = "2.35k",
title = "Emre va réussir son TP de CI/CD mercredi?")
LazyRow(
modifier = Modifier.padding(vertical = 19.dp),
horizontalArrangement = Arrangement.spacedBy(9.dp)
){
item{
Spacer(modifier = Modifier.width(horizontalPadding))
}
items(items){
var isSelected by remember { mutableStateOf(false) }
AllInChip(text = it, isSelected = isSelected, onClick = {isSelected = !isSelected})
}
item{
Spacer(modifier = Modifier.width(horizontalPadding))
}
LazyColumn{
item {
HomePopularCards(
modifier = Modifier
.padding(horizontal = horizontalPadding)
.padding(top = 23.dp),
nbPlayers = 12,
points = "2.35k",
title = "Emre va réussir son TP de CI/CD mercredi?"
)
}
LazyColumn(
modifier = Modifier.padding(horizontal = horizontalPadding),
verticalArrangement = Arrangement.spacedBy(24.dp)
){
items(5){
HomeBetCard(
creator = "Lucas",
category = "Études",
title = "Emre va réussir son TP de CI/CD mercredi?",
date = "11 Sept.",
time = "13:00",
nbPlayer = 4,
onClickParticipate = { /* TODO */ }
)
stickyHeader {
LazyRow(
modifier = Modifier
.background(
Brush.verticalGradient(
0.5f to AllInTheme.colors.allIn_White,
1f to Color.Transparent
)
)
.padding(vertical = 19.dp),
horizontalArrangement = Arrangement.spacedBy(9.dp)
) {
item {
Spacer(modifier = Modifier.width(horizontalPadding))
}
items(items) {
var isSelected by remember { mutableStateOf(false) }
AllInChip(
text = it,
isSelected = isSelected,
onClick = { isSelected = !isSelected })
}
item {
Spacer(modifier = Modifier.width(horizontalPadding))
}
}
}
items(5){
HomeBetCard(
creator = "Lucas",
category = "Études",
title = "Emre va réussir son TP de CI/CD mercredi?",
date = "11 Sept.",
time = "13:00",
nbPlayer = 4,
onClickParticipate = { /* TODO */ },
modifier = Modifier.padding(horizontal = horizontalPadding)
)
Spacer(modifier = Modifier.height(24.dp))
}
}
}

@ -10,14 +10,12 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.RectangleShape
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.navigation.NavHostController
import androidx.navigation.compose.rememberNavController
import fr.iut.alldev.allin.R
import fr.iut.alldev.allin.ui.core.topbar.AllInTopBar
import fr.iut.alldev.allin.ui.core.ProfilePicture
import fr.iut.alldev.allin.ui.navigation.AllInNavHost
import fr.iut.alldev.allin.ui.navigation.Routes
import fr.iut.alldev.allin.ui.theme.AllInTheme
@ -29,11 +27,32 @@ sealed class TopLevelDestination(
val route: String,
val title: String,
val subtitle: String,
val emoji: Int
) {
object BET : TopLevelDestination(route = Routes.BET, title = "CREER UN BET", subtitle = "Créez un nouveau BET et faites participer vos amis.")
object BET_HISTORY : TopLevelDestination(route = Routes.BET_HISTORY, title = "HISTORIQUE DES BETS", subtitle = "Consultez vos paris en cours et terminés.")
object FRIENDS : TopLevelDestination(route = Routes.FRIENDS, title = "AMIS", subtitle = "Défiez vos porches en les ajoutant en amis.")
object CURRENT_BETS : TopLevelDestination(route = Routes.CURRENT_BETS, title = "BETS EN COURS", subtitle = "Gérez vos bets et récompensez les gagnants.")
object BET : TopLevelDestination(
route = Routes.BET,
title = "CREER UN BET",
subtitle = "Créez un nouveau BET et faites participer vos amis.",
emoji = R.drawable.video_game
)
object BET_HISTORY : TopLevelDestination(
route = Routes.BET_HISTORY,
title = "HISTORIQUE DES BETS",
subtitle = "Consultez vos paris en cours et terminés.",
emoji = R.drawable.eyes
)
object FRIENDS : TopLevelDestination(
route = Routes.FRIENDS,
title = "AMIS",
subtitle = "Défiez vos porches en les ajoutant en amis.",
emoji = R.drawable.holding_hands
)
object CURRENT_BETS : TopLevelDestination(
route = Routes.CURRENT_BETS,
title = "BETS EN COURS",
subtitle = "Gérez vos bets et récompensez les gagnants.",
emoji = R.drawable.money_with_wings
)
}
val topLevelDestinations = listOf(
@ -59,6 +78,14 @@ fun AllInDrawer(
drawerWidth = drawerState.offset.value
}
val localDensity = LocalDensity.current
val contentOffset by derivedStateOf {
if (drawerWidth == 0f) 0.dp
else with(localDensity) {
(abs(drawerWidth) + drawerOffset.value).toDp()
}
}
ModalNavigationDrawer(
drawerState = drawerState,
drawerContent = {
@ -66,26 +93,19 @@ fun AllInDrawer(
drawerShape = RectangleShape,
drawerContainerColor = AllInTheme.colors.allIn_Dark
) {
Column(
Modifier
.padding(top = 39.dp, bottom = 26.dp)
.fillMaxWidth(),
horizontalAlignment = Alignment.CenterHorizontally){
ProfilePicture(
borderWidth = 1.dp
)
Spacer(modifier = Modifier.height(12.dp))
Text(text = "Pseudo",
fontSize = 20.sp,
color = AllInTheme.colors.allIn_LighterGrey,
textAlign = TextAlign.Center,
fontWeight = FontWeight.W700)
}
DrawerHeader(
nbBets = 135,
bestWin = 365,
nbFriends = 5,
username = "Pseudo",
modifier = Modifier.padding(top = 39.dp, bottom = 26.dp)
)
topLevelDestinations.forEach { item ->
DrawerCell(
title = item.title,
subtitle = item.subtitle,
emoji = null,
emoji = painterResource(id = item.emoji),
onClick = { scope.launch { drawerState.close() }
navController.navigate(item.route){
launchSingleTop = true
@ -109,7 +129,7 @@ fun AllInDrawer(
modifier = Modifier.align(Alignment.BottomStart)){
Icon(imageVector = Icons.Filled.Settings,
modifier = Modifier.size(40.dp),
tint = AllInTheme.colors.allIn_DarkGrey,
tint = AllInTheme.colors.allIn_DarkGrey50,
contentDescription = null)
}
}
@ -117,9 +137,7 @@ fun AllInDrawer(
}
) {
Scaffold(
modifier = Modifier.offset( x = with(LocalDensity.current) {
(abs(drawerWidth) + drawerOffset.value).toDp()
}),
modifier = Modifier.offset( x = contentOffset),
topBar = { AllInTopBar(onMenuClicked = { scope.launch { drawerState.open() } }, coinAmount = 541) }// TODO: CoinAmount
) {
Column(

@ -1,21 +1,22 @@
package fr.iut.alldev.allin.ui.navigation.drawer
import android.media.Image
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ChevronRight
import androidx.compose.material.icons.filled.Face
import androidx.compose.material3.*
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.res.painterResource
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 fr.iut.alldev.allin.R
import fr.iut.alldev.allin.ui.theme.AllInTheme
@OptIn(ExperimentalMaterial3Api::class)
@ -23,33 +24,46 @@ import fr.iut.alldev.allin.ui.theme.AllInTheme
fun DrawerCell(
title: String,
subtitle: String,
emoji: Image?,
emoji: Painter,
onClick: ()->Unit,
modifier: Modifier = Modifier
) {
Card(onClick = onClick,
modifier = modifier,
border = BorderStroke(width = 1.dp, color = AllInTheme.colors.allIn_DarkGrey),
border = BorderStroke(width = 1.dp, color = AllInTheme.colors.allIn_DarkGrey50),
shape = RoundedCornerShape(20),
colors = CardDefaults.cardColors(containerColor = AllInTheme.colors.allIn_DarkerGrey)) {
Row(modifier = Modifier.padding(horizontal = 10.dp, vertical = 17.dp)) {
Icon(imageVector = Icons.Default.Face,
colors = CardDefaults.cardColors(containerColor = AllInTheme.colors.allIn_DarkGrey100)) {
Row(
modifier = Modifier.padding(horizontal = 10.dp, vertical = 17.dp),
verticalAlignment = Alignment.CenterVertically
) {
Image(
painter = emoji,
contentDescription = null,
modifier = Modifier.padding(end = 11.dp))
modifier = Modifier
.height(28.dp)
.padding(end = 11.dp)
)
Column(modifier = Modifier.weight(1f)) {
Text(
text = title,
style = AllInTheme.typography.h2,
fontSize = 13.sp,
color = AllInTheme.colors.white,
fontWeight = FontWeight.W700
)
Text(text = subtitle,
Text(
text = subtitle,
style = AllInTheme.typography.r,
fontSize = 9.sp,
color = AllInTheme.colors.allIn_LightGrey)
color = AllInTheme.colors.allIn_LightGrey300,
)
}
Icon(imageVector = Icons.Default.ChevronRight,
tint = AllInTheme.colors.allIn_DarkGrey,
contentDescription = null)
Icon(
imageVector = Icons.Default.ChevronRight,
tint = AllInTheme.colors.allIn_DarkGrey50,
contentDescription = null
)
}
}
@ -58,10 +72,12 @@ fun DrawerCell(
@Preview
@Composable
private fun DrawerCellPreview() {
DrawerCell(
title = "CREER UN BET",
subtitle = "Créez un nouveau BET",
emoji = null,
onClick = {}
)
AllInTheme {
DrawerCell(
title = "CREER UN BET",
subtitle = "Créez un nouveau BET",
emoji = painterResource(id = R.drawable.video_game),
onClick = {}
)
}
}

@ -0,0 +1,62 @@
package fr.iut.alldev.allin.ui.navigation.drawer
import androidx.compose.foundation.layout.*
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
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 fr.iut.alldev.allin.ui.core.ProfilePicture
import fr.iut.alldev.allin.ui.theme.AllInTheme
@Composable
fun DrawerHeader(
nbBets: Int,
bestWin: Int,
nbFriends: Int,
username: String,
modifier: Modifier = Modifier
) {
Column(
modifier = modifier.fillMaxWidth(),
horizontalAlignment = Alignment.CenterHorizontally
) {
ProfilePicture(
borderWidth = 1.dp
)
Spacer(modifier = Modifier.height(12.dp))
Text(
text = username,
fontSize = 20.sp,
color = AllInTheme.colors.allIn_LightGrey200,
textAlign = TextAlign.Center,
style = AllInTheme.typography.h2,
)
Spacer(modifier = Modifier.height(28.dp))
Row(
modifier = Modifier.fillMaxWidth().padding(horizontal = 69.dp),
horizontalArrangement = Arrangement.SpaceBetween
) {
DrawerHeaderStat(label = "Bets", value = nbBets)
DrawerHeaderStat(label = "Meilleur gain", value = bestWin)
DrawerHeaderStat(label = "Amis", value = nbFriends)
}
}
}
@Preview
@Composable
private fun DrawerHeaderPreview() {
AllInTheme{
DrawerHeader(
nbBets = 114,
bestWin = 360,
nbFriends = 5,
username = "Pseudo"
)
}
}

@ -0,0 +1,37 @@
package fr.iut.alldev.allin.ui.navigation.drawer
import androidx.compose.foundation.layout.Column
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.tooling.preview.Preview
import fr.iut.alldev.allin.ui.theme.AllInTheme
@Composable
fun DrawerHeaderStat(
label: String,
value: Int
) {
Column(
horizontalAlignment = Alignment.CenterHorizontally
) {
Text(
text = value.toString(),
color = AllInTheme.colors.white,
style = AllInTheme.typography.h1
)
Text(
text = label,
color = AllInTheme.colors.allIn_LightGrey300,
style = AllInTheme.typography.r
)
}
}
@Preview
@Composable
private fun DrawerHeaderStatPreview() {
AllInTheme {
DrawerHeaderStat(label = "Amis", value = 5)
}
}

@ -9,46 +9,48 @@ import androidx.compose.ui.graphics.Color
@Immutable
data class AllInColors(
val allIn_Dark: Color,
val allIn_DarkerGrey: Color,
val allIn_DarkGrey: Color,
val allIn_DarkGrey100: Color,
val allIn_DarkGrey50: Color,
val allIn_Grey: Color,
val allIn_LightGrey: Color,
val allIn_LighterGrey: Color,
val allIn_LightestGrey: Color,
val allIn_LightestestGrey: Color,
val allIn_LightGrey300: Color,
val allIn_LightGrey200: Color,
val allIn_LightGrey100: Color,
val allIn_LightGrey50: Color,
val allIn_White: Color,
val white: Color,
val allIn_Pink: Color,
val allIn_Purple: Color,
val allIn_Blue: Color,
val allIn_MainGradient: Brush,
val allIn_TextGradient: Brush
)
internal val LocalColors = staticCompositionLocalOf {
AllInColors(
allIn_Dark = Color(0xFF2A2A2A),
allIn_DarkerGrey = Color(0xFF393939),
allIn_DarkGrey = Color(0xFF454545),
allIn_Grey = Color(0xFF525252),
allIn_LightGrey = Color(0XFFAAAAAA),
allIn_LighterGrey = Color(0XFFC5C5C5),
allIn_LightestGrey = Color(0XFFEBEBEB),
allIn_LightestestGrey = Color(0XFFF7F7F7),
allIn_White = Color(0xFFEBEBF6),
white = Color(0xFFFFFFFF),
allIn_Pink = Color(0xFFFF2A89),
allIn_Purple = Color(0xFF7D79FF),
allIn_Dark = Color.Unspecified,
allIn_DarkGrey100 = Color.Unspecified,
allIn_DarkGrey50 = Color.Unspecified,
allIn_Grey = Color.Unspecified,
allIn_LightGrey300 = Color.Unspecified,
allIn_LightGrey200 = Color.Unspecified,
allIn_LightGrey100 = Color.Unspecified,
allIn_LightGrey50 = Color.Unspecified,
allIn_White = Color.Unspecified,
white = Color.Unspecified,
allIn_Pink = Color.Unspecified,
allIn_Purple = Color.Unspecified,
allIn_Blue = Color.Unspecified,
allIn_MainGradient = Brush.linearGradient(
0.0f to Color(0xFFf951a8),
0.5f to Color(0xFFaa7ef3),
1.1f to Color(0xFF199fee),
1.0f to Color(0xFF199fee),
start = Offset(0f, Float.POSITIVE_INFINITY),
end = Offset(Float.POSITIVE_INFINITY, 0f)
),
allIn_TextGradient = Brush.horizontalGradient(
0.0f to Color(0xFFF876C1),
1.1f to Color(0xFF2399F8)
1.0f to Color(0xFF2399F8)
)
)
}

@ -1,15 +1,85 @@
package fr.iut.alldev.allin.ui.theme
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material.ripple.RippleAlpha
import androidx.compose.material.ripple.RippleTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight
@Composable
fun AllInTheme(content: @Composable () -> Unit) {
CompositionLocalProvider(
LocalColors provides LocalColors.current,
content = content
fun AllInTheme(
content: @Composable () -> Unit
) {
val customColors = AllInColors(
allIn_Dark = Color(0xFF2A2A2A),
allIn_DarkGrey100 = Color(0xFF393939),
allIn_DarkGrey50 = Color(0xFF454545),
allIn_Grey = Color(0xFF525252),
allIn_LightGrey300 = Color(0XFFAAAAAA),
allIn_LightGrey200 = Color(0XFFC5C5C5),
allIn_LightGrey100 = Color(0XFFEBEBEB),
allIn_LightGrey50 = Color(0XFFF7F7F7),
allIn_White = Color(0xFFEBEBF6),
white = Color(0xFFFFFFFF),
allIn_Pink = Color(0xFFFF2A89),
allIn_Purple = Color(0xFF7D79FF),
allIn_Blue = Color(0xFF6a89fa),
allIn_MainGradient = Brush.linearGradient(
0.0f to Color(0xFFf951a8),
0.5f to Color(0xFFaa7ef3),
1.0f to Color(0xFF199fee),
start = Offset(0f, Float.POSITIVE_INFINITY),
end = Offset(Float.POSITIVE_INFINITY, 0f)
),
allIn_TextGradient = Brush.horizontalGradient(
0.0f to Color(0xFFF876C1),
1.0f to Color(0xFF2399F8)
)
)
val customTypography = AllInTypography(
h1 = TextStyle(
fontFamily = PlusJakartaSans,
fontWeight = FontWeight.ExtraBold,
),
h2 = TextStyle(
fontFamily = PlusJakartaSans,
fontWeight = FontWeight.Bold,
),
h3 = TextStyle(
fontFamily = PlusJakartaSans,
fontWeight = FontWeight.SemiBold,
),
m = TextStyle(
fontFamily = PlusJakartaSans,
fontWeight = FontWeight.Medium,
),
r = TextStyle(
fontFamily = PlusJakartaSans,
fontWeight = FontWeight.Normal,
),
s = TextStyle(
fontFamily = PlusJakartaSans,
fontWeight = FontWeight.Light,
),
xs = TextStyle(
fontFamily = PlusJakartaSans,
fontWeight = FontWeight.ExtraLight,
)
)
CompositionLocalProvider(
LocalColors provides customColors,
LocalTypography provides customTypography
){
content()
}
}
object AllInTheme {
@ -17,4 +87,21 @@ object AllInTheme {
@Composable
@ReadOnlyComposable
get() = LocalColors.current
val typography: AllInTypography
@Composable
@ReadOnlyComposable
get() = LocalTypography.current
}
object AllInRippleTheme : RippleTheme {
@Composable
override fun defaultColor(): Color = AllInTheme.colors.allIn_Blue
@Composable
override fun rippleAlpha(): RippleAlpha = RippleTheme.defaultRippleAlpha(
Color.Black,
lightTheme = !isSystemInDarkTheme()
)
}

@ -1,34 +1,42 @@
package fr.iut.alldev.allin.ui.theme
import androidx.compose.material3.Typography
import androidx.compose.runtime.Immutable
import androidx.compose.runtime.staticCompositionLocalOf
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.Font
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.sp
import fr.iut.alldev.allin.R
// Set of Material typography styles to start with
val Typography = Typography(
bodyLarge = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 16.sp,
lineHeight = 24.sp,
letterSpacing = 0.5.sp
val PlusJakartaSans = FontFamily(
Font(R.font.plusjakartasans_extralight, weight = FontWeight.ExtraLight),
Font(R.font.plusjakartasans_light, weight = FontWeight.Light),
Font(R.font.plusjakartasans_regular, weight = FontWeight.Normal),
Font(R.font.plusjakartasans_medium, weight = FontWeight.Medium),
Font(R.font.plusjakartasans_semibold, weight = FontWeight.SemiBold),
Font(R.font.plusjakartasans_bold, weight = FontWeight.Bold),
Font(R.font.plusjakartasans_extrabold, weight = FontWeight.ExtraBold)
)
/* Other default text styles to override
titleLarge = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 22.sp,
lineHeight = 28.sp,
letterSpacing = 0.sp
),
labelSmall = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Medium,
fontSize = 11.sp,
lineHeight = 16.sp,
letterSpacing = 0.5.sp
)
*/
)
@Immutable
data class AllInTypography(
val h1: TextStyle,
val h2: TextStyle,
val h3: TextStyle,
val m: TextStyle,
val r: TextStyle,
val s: TextStyle,
val xs: TextStyle
)
val LocalTypography = staticCompositionLocalOf {
AllInTypography(
h1 = TextStyle.Default,
h2 = TextStyle.Default,
h3 = TextStyle.Default,
m = TextStyle.Default,
r = TextStyle.Default,
s = TextStyle.Default,
xs = TextStyle.Default
)
}

@ -1,30 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>

@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="14dp"
android:height="14dp"
android:viewportWidth="14"
android:viewportHeight="14">
<path
android:pathData="M10.401,0.274L13.705,9.959C14.318,11.752 12.981,13.615 11.081,13.615C10.918,13.615 10.775,13.51 10.727,13.355L6.591,0H10.018C10.191,0 10.345,0.11 10.401,0.274Z"
android:fillColor="#2C2C2C"/>
<path
android:pathData="M3.826,2.029L0.017,13.191C-0.054,13.399 0.101,13.615 0.322,13.615C3.752,13.615 6.781,11.386 7.793,8.117L10.136,0.554C10.221,0.279 10.015,0 9.726,0H6.668C5.383,0 4.24,0.816 3.826,2.029Z"
android:fillColor="#2C2C2C"/>
</vector>

@ -0,0 +1,50 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="35dp"
android:height="34dp"
android:viewportWidth="35"
android:viewportHeight="34">
<path
android:pathData="M25.64,0.847L33.73,24.557C35.229,28.949 31.955,33.509 27.304,33.509C26.907,33.509 26.556,33.251 26.439,32.873L16.313,0.177H24.702C25.126,0.177 25.503,0.446 25.64,0.847Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="15.253"
android:startY="0.177"
android:endX="22.116"
android:endY="33.635"
android:type="linear">
<item android:offset="0.073" android:color="#FFFFFFFF"/>
<item android:offset="1" android:color="#19FFFFFF"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M9.543,5.145L0.219,32.471C0.046,32.98 0.425,33.509 0.964,33.509C9.361,33.509 16.778,28.051 19.257,20.05L24.992,1.533C25.2,0.859 24.695,0.177 23.988,0.177H16.5C13.354,0.177 10.557,2.174 9.543,5.145Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="14.15"
android:startY="8.476"
android:endX="6.509"
android:endY="30.7"
android:type="linear">
<item android:offset="0" android:color="#FFFFFFFF"/>
<item android:offset="1" android:color="#21FFFFFF"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M16.185,0.36C13.244,0.489 10.666,2.403 9.711,5.202L0.387,32.528C0.252,32.922 0.546,33.332 0.964,33.332C9.284,33.332 16.632,27.925 19.088,19.997L20.677,14.865L16.185,0.36ZM16.077,0.012C13.03,0.182 10.369,2.179 9.376,5.088L0.052,32.414C-0.161,33.038 0.305,33.685 0.964,33.685C9.438,33.685 16.924,28.178 19.425,20.102L20.862,15.462L26.271,32.925C26.411,33.377 26.83,33.685 27.304,33.685C32.076,33.685 35.436,29.007 33.898,24.5L25.807,0.789C25.646,0.317 25.202,0 24.702,0H16.073L16.077,0.012ZM23.989,0.353H16.553L20.862,14.268L24.823,1.481C24.996,0.921 24.577,0.353 23.989,0.353ZM21.047,14.865L25.16,1.585C25.301,1.132 25.165,0.676 24.868,0.37C25.146,0.428 25.379,0.628 25.473,0.904L33.563,24.614C35.022,28.89 31.835,33.332 27.304,33.332C26.984,33.332 26.702,33.124 26.608,32.82L21.047,14.865Z"
android:fillType="evenOdd">
<aapt:attr name="android:fillColor">
<gradient
android:startX="17.137"
android:startY="0.177"
android:endX="17.137"
android:endY="33.509"
android:type="linear">
<item android:offset="0" android:color="#00FFFFFF"/>
<item android:offset="1" android:color="#FFFFFFFF"/>
</gradient>
</aapt:attr>
</path>
</vector>

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="448dp"
android:height="512dp"
android:viewportWidth="448"
android:viewportHeight="512">
<path
android:fillColor="#FF000000"
android:pathData="M159.3,5.4c7.8,-7.3 19.9,-7.2 27.7,0.1c27.6,25.9 53.5,53.8 77.7,84c11,-14.4 23.5,-30.1 37,-42.9c7.9,-7.4 20.1,-7.4 28,0.1c34.6,33 63.9,76.6 84.5,118c20.3,40.8 33.8,82.5 33.8,111.9C448,404.2 348.2,512 224,512C98.4,512 0,404.1 0,276.5c0,-38.4 17.8,-85.3 45.4,-131.7C73.3,97.7 112.7,48.6 159.3,5.4zM225.7,416c25.3,0 47.7,-7 68.8,-21c42.1,-29.4 53.4,-88.2 28.1,-134.4c-4.5,-9 -16,-9.6 -22.5,-2l-25.2,29.3c-6.6,7.6 -18.5,7.4 -24.7,-0.5c-16.5,-21 -46,-58.5 -62.8,-79.8c-6.3,-8 -18.3,-8.1 -24.7,-0.1c-33.8,42.5 -50.8,69.3 -50.8,99.4C112,375.4 162.6,416 225.7,416z"/>
</vector>

@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="26dp"
android:height="15dp"
android:viewportWidth="26"
android:viewportHeight="15">
<path
android:pathData="M0,1.324C0,0.593 0.602,0 1.345,0H24.655C25.398,0 26,0.593 26,1.324C26,2.054 25.398,2.647 24.655,2.647H1.345C0.602,2.647 0,2.054 0,1.324Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M0,7.5C0,6.769 0.602,6.176 1.345,6.176H24.655C25.398,6.176 26,6.769 26,7.5C26,8.231 25.398,8.824 24.655,8.824H1.345C0.602,8.824 0,8.231 0,7.5Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M0,13.677C0,12.946 0.602,12.353 1.345,12.353H24.655C25.398,12.353 26,12.946 26,13.677C26,14.407 25.398,15 24.655,15H1.345C0.602,15 0,14.407 0,13.677Z"
android:fillColor="#ffffff"/>
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

@ -1,170 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<background android:drawable="@mipmap/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<monochrome android:drawable="@mipmap/ic_launcher_monochrome"/>
</adaptive-icon>

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 982 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

@ -1,10 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
</resources>

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Allin" parent="android:Theme.Material.Light.NoActionBar" />
</resources>

@ -1,6 +1,7 @@
buildscript {
ext {
compose_version = '1.2.0'
accompanist_version = '0.25.1'
}
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {

@ -5,11 +5,11 @@ plugins {
android {
namespace 'fr.iut.alldev.allin.data'
compileSdk 33
compileSdk 34
defaultConfig {
minSdk 21
targetSdk 33
targetSdk 34
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"

@ -10,6 +10,7 @@ dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
rootProject.name = "allin"

Loading…
Cancel
Save