From 9a61e18cc017e38ba6bfbe6a6cefee4603bdbdaa Mon Sep 17 00:00:00 2001
From: Hanifah Adhiya <202210715291@mhs.ubharajaya.ac.id>
Date: Thu, 9 Jan 2025 23:27:31 +0700
Subject: [PATCH] Merge branch 'master' of
https://git.lab.ubharajaya.ac.id/administrator/UAS Hani Commit
---
app/src/main/AndroidManifest.xml | 2 +-
.../java/com/example/siamobile/KHSActivity.kt | 2 +-
.../com/example/siamobile/Mhs202210715291.kt | 179 ++++++++++++++++++
3 files changed, 181 insertions(+), 2 deletions(-)
create mode 100644 app/src/main/java/com/example/siamobile/Mhs202210715291.kt
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 841b750..891881c 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -16,7 +16,7 @@
android:name=".Mhs202210715136"
android:exported="false" />
+ var isSelected by remember { mutableStateOf(false) }
+
+ Row(
+ modifier = Modifier
+ .fillMaxWidth()
+ .padding(vertical = 4.dp)
+ .clickable {
+ isSelected = !isSelected
+ }
+ .background(
+ if (isSelected) MaterialTheme.colorScheme.secondaryContainer
+ else Color.Transparent,
+ RoundedCornerShape(8.dp)
+ )
+ .padding(vertical = 12.dp, horizontal = 16.dp)
+ .animateContentSize(),
+ horizontalArrangement = Arrangement.SpaceBetween
+ ) {
+ Text(
+ text = no.toString(),
+ style = MaterialTheme.typography.bodyMedium,
+ fontSize = 16.sp,
+ modifier = Modifier.weight(0.2f)
+ )
+ Text(
+ text = course,
+ style = MaterialTheme.typography.bodyMedium,
+ fontSize = 16.sp,
+ modifier = Modifier.weight(0.6f)
+ )
+ Text(
+ text = semester.toString(),
+ style = MaterialTheme.typography.bodyMedium,
+ fontSize = 16.sp,
+ modifier = Modifier.weight(0.2f)
+ )
+ }
+ }
+ }
+ }
+
+ // Interactive Back Button with visual feedback
+ Button(
+ onClick = { (context as? ComponentActivity)?.finish() },
+ modifier = Modifier
+ .align(Alignment.CenterHorizontally)
+ .padding(top = 16.dp),
+ colors = ButtonDefaults.buttonColors(
+ containerColor = MaterialTheme.colorScheme.primary,
+ contentColor = MaterialTheme.colorScheme.onPrimary
+ )
+ ) {
+ Text(text = "Kembali")
+ }
+ }
+}