fix : pb intent
continuous-integration/drone/push Build is passing Details

androidCompose
Yvan CALATAYUD 1 year ago
parent 10a5fbfc23
commit 9f40a5a5a2

@ -20,7 +20,8 @@ class QuizMultiActivity : ComponentActivity() {
setContent { setContent {
MathsEducTheme { MathsEducTheme {
QuizMultiScreen() val lobbyId = intent.getIntExtra("lobbyId",-1)
QuizMultiScreen(lobbyId) //TODO sus
} }
} }
} }
@ -32,10 +33,3 @@ class QuizMultiActivity : ComponentActivity() {
} }
} }
@Preview(showBackground = true)
@Composable
fun QuizMultiScreenPreview() {
MathsEducTheme {
QuizMultiScreen()
}
}

@ -1,6 +1,7 @@
package com.example.mathseduc.ui package com.example.mathseduc.ui
import android.os.CountDownTimer import android.os.CountDownTimer
import android.util.Log
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.Box import androidx.compose.foundation.layout.Box
@ -30,25 +31,19 @@ import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import com.example.mathseduc.QuizMultiActivity import com.example.mathseduc.QuizMultiActivity
import com.example.mathseduc.controllers.ControllerLobby import com.example.mathseduc.controllers.ControllerLobby
import com.example.mathseduc.controllers.ControllerQuestion
import com.example.mathseduc.ui.theme.Colors import com.example.mathseduc.ui.theme.Colors
import com.example.mathseduc.ui.theme.MathsEducTheme import com.example.mathseduc.ui.theme.MathsEducTheme
@Preview
@Composable
fun QuizMultiPreview() {
MathsEducTheme {
QuizMultiScreen()
}
}
@Composable @Composable
fun QuizMultiScreen() { fun QuizMultiScreen(lobbyId: Int) {
var progressBar1Value by remember { mutableStateOf(0.0f) } var progressBar1Value by remember { mutableStateOf(0.0f) }
var chronoValue by remember { mutableStateOf(0.0f) } var chronoValue by remember { mutableStateOf(0.0f) }
//val lobbyId = intent.getIntExtra("lobbyId",-1) var listQuestion = ControllerQuestion.getQuestionsForLobby(ControllerLobby.getIdQuestionsLobby(lobbyId))
//var listQuestion = ControllerLobby.getIdQuestionsLobby()
Column( Column(
modifier = Modifier modifier = Modifier
@ -103,7 +98,7 @@ fun QuizMultiScreen() {
.background(color = Color.Gray, shape = RoundedCornerShape(8.dp)) .background(color = Color.Gray, shape = RoundedCornerShape(8.dp))
) { ) {
Text( Text(
text = "Question", text = "test",
modifier = Modifier modifier = Modifier
.padding(16.dp), .padding(16.dp),
color = Color.White, color = Color.White,

Loading…
Cancel
Save