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