Add save function to grades
This commit is contained in:
@@ -74,20 +74,23 @@ fun NotenContent(activity: ComponentActivity){
|
||||
)
|
||||
|
||||
Column(modifier = Modifier.verticalScroll(rememberScrollState())) {
|
||||
FachButton(color = Color(0xFF69F0AE), text = "Deutsch", 3.66f, activity)
|
||||
FachButton(color = Color(0xFFEEFF41), text = "Mathe", 1.56f, activity)
|
||||
FachButton(color = Color(0xFFFFAB40), text = "Englisch", 2.27f, activity)
|
||||
FachButton(color = Color(0xFF18FFFF), text = "Latein", 4.75f, activity)
|
||||
FachButton(color = Color(0xFFB2FF59), text = "Französisch", 2.33f, activity)
|
||||
FachButton(color = Color(0xFF69F0AE), text = "Deutsch", 0, 3.66f, activity)
|
||||
FachButton(color = Color(0xFFEEFF41), text = "Mathe",2, 1.56f, activity)
|
||||
FachButton(color = Color(0xFFFFAB40), text = "Englisch",2, 2.27f, activity)
|
||||
FachButton(color = Color(0xFF18FFFF), text = "Latein",2, 4.75f, activity)
|
||||
FachButton(color = Color(0xFFB2FF59), text = "Französisch",2, 2.33f, activity)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun FachButton(color : Color, text : String, average : Float, activity : ComponentActivity){
|
||||
fun FachButton(color : Color, text : String, saWeight: Int, average : Float, activity : ComponentActivity){
|
||||
Button(
|
||||
onClick = {
|
||||
val intent = Intent(activity, FachActivity::class.java).apply { putExtra(FachActivity.ARGUMENT_KEY, text) }
|
||||
val intent = Intent(activity, FachActivity::class.java).apply {
|
||||
putExtra(FachActivity.NAME_KEY, text)
|
||||
putExtra(FachActivity.WEIGHT_KEY, saWeight)
|
||||
}
|
||||
activity.startActivity(intent) },
|
||||
shape = RoundedCornerShape(40),
|
||||
colors = ButtonDefaults.outlinedButtonColors(containerColor = color),
|
||||
|
||||
Reference in New Issue
Block a user