création navbar a finir

pull/24/head
brongniart 2 months ago committed by Kentin BRONGNIART
parent 5d5af2b1d8
commit be33806593

@ -1,4 +1,32 @@
package com.example.what_the_fantasy.ui.components package com.example.what_the_fantasy.ui.components
class NavBar { import android.widget.ImageView
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.FlowRow
import androidx.compose.foundation.layout.Row
import androidx.compose.material3.BottomAppBar
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import com.example.what_the_fantasy.R
import com.example.what_the_fantasy.ui.theme.colorNavBar
@Composable
fun NavBar(actualPage :String) {
FlowRow(modifier = Modifier
.background(colorNavBar),
Arrangement.SpaceAround
){
Text("Favorie")
Image( painter = painterResource(R.mipmap.ic_launcher_foreground), contentDescription = "Accueil")
Text("Quiz")
}
} }

@ -39,6 +39,7 @@ import androidx.navigation.compose.composable
import com.example.what_the_fantasy.R import com.example.what_the_fantasy.R
import com.example.what_the_fantasy.data.local.UserStub import com.example.what_the_fantasy.data.local.UserStub
import com.example.what_the_fantasy.data.model.User import com.example.what_the_fantasy.data.model.User
import com.example.what_the_fantasy.ui.components.NavBar
import com.example.what_the_fantasy.ui.components.SpaceHeightComponent import com.example.what_the_fantasy.ui.components.SpaceHeightComponent
import com.example.what_the_fantasy.ui.components.TitlePageComponent import com.example.what_the_fantasy.ui.components.TitlePageComponent
import com.example.what_the_fantasy.ui.theme.colorBackground import com.example.what_the_fantasy.ui.theme.colorBackground
@ -57,6 +58,7 @@ fun LoginPage(navControllerSignUp: () -> Unit, navControllerProfil: (Int) -> Uni
.background(colorBackground), .background(colorBackground),
contentAlignment = Alignment.Center contentAlignment = Alignment.Center
){ ){
Column( Column(
modifier = Modifier modifier = Modifier
.fillMaxWidth(0.9f) .fillMaxWidth(0.9f)
@ -75,6 +77,7 @@ fun LoginPage(navControllerSignUp: () -> Unit, navControllerProfil: (Int) -> Uni
SpaceHeightComponent(16) SpaceHeightComponent(16)
CreateAccountButton(R.string.ButtonCreateLogin,12, Color.White, navControllerSignUp) CreateAccountButton(R.string.ButtonCreateLogin,12, Color.White, navControllerSignUp)
} }
NavBar("")
} }
} }

@ -16,4 +16,6 @@ val gradienBox = Brush.linearGradient(
start = Offset(0f, 1000f), // Départ en bas à gauche start = Offset(0f, 1000f), // Départ en bas à gauche
end = Offset(1000f, 0f) // Fin en haut à droite end = Offset(1000f, 0f) // Fin en haut à droite
) )
val colorBackground = Color(0xFF100C1B) val colorBackground = Color(0xFF100C1B)
val colorNavBar = Color(0xFF2F0E62)
Loading…
Cancel
Save