package com.example.siamobile import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent import androidx.compose.foundation.layout.* import androidx.compose.material3.* import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import com.example.siamobile.ui.theme.SIAMobileTheme class Mhs000000000000 : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) val mahasiswaName = intent.getStringExtra("mahasiswaName") ?: "NPM: xx Nama:Example" setContent { SIAMobileTheme { DetailMahasiswaScreen(mahasiswaName) } } } } @Composable fun DetailMahasiswaScreen(mahasiswaName: String) { val context = LocalContext.current Column( modifier = Modifier .fillMaxSize() .padding(16.dp), verticalArrangement = Arrangement.SpaceBetween ) { Column { Text( text = "KHS Mahasiswa", style = MaterialTheme.typography.headlineMedium, fontWeight = FontWeight.Bold ) Spacer(modifier = Modifier.height(8.dp)) Text( text = mahasiswaName, style = MaterialTheme.typography.bodyLarge, fontWeight = FontWeight.Medium ) } Button( onClick = { (context as? ComponentActivity)?.finish() }, modifier = Modifier.align(Alignment.CenterHorizontally) ) { Text(text = "Kembali") } } }