Compare commits

...

4 Commits
master ... main

Author SHA1 Message Date
26a446bd5b Update gradle/libs.versions.toml 2025-01-09 18:01:02 +00:00
2b3a9f0250 Update gradle/libs.versions.toml 2025-01-09 18:00:29 +00:00
“Yanuar
56eb367c2f first commit 2025-01-09 22:20:32 +07:00
“Yanuar
fbac9fadfc first commit 2025-01-09 22:02:50 +07:00
6 changed files with 154 additions and 6 deletions

2
.idea/compiler.xml generated
View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="21" />
<bytecodeTargetLevel target="17" />
</component>
</project>

1
.idea/gradle.xml generated
View File

@ -4,7 +4,6 @@
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="CHOOSE_PER_TEST" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
<option name="modules">

3
.idea/misc.xml generated
View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="jbr-21" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

View File

@ -15,6 +15,9 @@
<activity
android:name=".Mhs000000000000"
android:exported="false" />
<activity
android:name=".Mhs202210715139"
android:exported="false" />
<activity
android:name=".KHSActivity"
android:exported="false" />

View File

@ -105,7 +105,8 @@ fun KHSScreen() {
fun KHSItem(mahasiswaName: String) {
val context = LocalContext.current
val mahasiswaActivityMap = mapOf(
"000000000000 EXAMPLE" to Mhs000000000000::class.java
"000000000000 EXAMPLE" to Mhs000000000000::class.java,
"202210715139 ANDRE SAPUTRA GINTING" to Mhs202210715139::class.java
//"202210715185 AHMAD DIMAS RAMADHAN" to Mhs202210715185::class.java,
// silahkan ditambahkan di sini untuk NPM yang lain
)
@ -137,8 +138,6 @@ fun KHSItem(mahasiswaName: String) {
}
}
}
/*
@Composable

View File

@ -0,0 +1,146 @@
package com.example.siamobile
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.material3.*
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
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
data class MataKuliah(
val no: Int,
val namaMK: String,
val sem: Int,
val sks: Int,
)
class Mhs202210715139 : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val mahasiswaName = intent.getStringExtra("mahasiswaName") ?: "Nama: Andre Saputra Ginting\nNPM: 202210715139"
setContent {
SIAMobileTheme {
DetailMahasiswaScreen2(mahasiswaName)
}
}
}
}
@Composable
fun DetailMahasiswaScreen2(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
)
Spacer(modifier = Modifier.height(16.dp))
TabelMataKuliah() // Menambahkan tabel mata kuliah
}
// Remove Spacer and use a fixed height for the button area
Button(
onClick = { (context as? ComponentActivity)?.finish() },
modifier = Modifier
.align(Alignment.CenterHorizontally)
.padding(top = 16.dp) // Add some padding for spacing
.fillMaxWidth() // Make the button full width
) {
Text(text = "Kembali")
}
}
}
@Composable
fun TabelMataKuliah() {
val mataKuliahList = listOf(
MataKuliah(1, "Aljabar Linear", 1, 3),
MataKuliah(2, "Character Building", 1, 2),
MataKuliah(3, "Dasar Pemrograman", 1, 2),
MataKuliah(4, "Fisika", 1, 3),
MataKuliah(5, "Kalkulus 1", 1, 3),
MataKuliah(6, "Kewarganegaraan", 1, 2),
MataKuliah(7, "Pendidikan Agama", 1, 2),
MataKuliah(8, "Pengantar Teknologi Informasi", 1, 2),
MataKuliah(9, "Struktur Data dan Algoritma", 1, 3),
MataKuliah(10, "Bahasa Indonesia", 2, 2),
MataKuliah(11, "Desain dan Analisis Algoritma", 2, 2),
MataKuliah(12, "Kalkulus II", 2, 3),
MataKuliah(13, "Logika Matematika", 2, 3),
MataKuliah(14, "Matematika Diskrit", 2, 3),
MataKuliah(15, "Sistem Basis Data", 2, 3),
MataKuliah(16, "Analisa Numerik", 3, 3),
MataKuliah(17, "Jaringan Komputer 1", 3, 3),
MataKuliah(18, "Pancasila", 3, 2),
MataKuliah(19, "Pemrograman Berorientasi Objek", 3, 3),
MataKuliah(20, "Pengantar Data Sains", 3, 2),
MataKuliah(21, "Pengantar Sistem Digital", 3, 3),
MataKuliah(22, "Rekayasa Perangkat Lunak", 3, 2),
MataKuliah(23, "Sistem Operasi", 3, 3),
MataKuliah(24, "Analisis dan Desain Berorientasi Objek", 4, 3),
MataKuliah(25, "Bahasa Inggris", 4, 2),
MataKuliah(26, "Jaringan Komputer II", 4, 3),
MataKuliah(27, "Pemrograman Web", 4, 3),
MataKuliah(28, "Pengantar Keamanan Komputer", 4, 3),
MataKuliah(29, "Pengantar Organisasi Komputer", 4, 3),
MataKuliah(30, "Statistika dan Probabilitas", 4, 3),
MataKuliah(31, "Teori Bahasa dan Otomata", 4, 3)
)
Column(modifier = Modifier.fillMaxWidth()) {
// Header Tabel
Row(
modifier = Modifier
.fillMaxWidth()
.padding(8.dp)
.background(Color(0xFF4CAF50)), // Mengatur warna hijau
verticalAlignment = Alignment.CenterVertically
) {
Text("No", modifier = Modifier.weight(0.1f), fontWeight = FontWeight.Bold, color = Color.White)
Text("Mata Kuliah", modifier = Modifier.weight(0.4f), fontWeight = FontWeight.Bold, color = Color.White)
Text("Sem", modifier = Modifier.weight(0.1f), fontWeight = FontWeight.Bold, color = Color.White)
Text("SKS", modifier = Modifier.weight(0.1f), fontWeight = FontWeight.Bold, color = Color.White)
}
// Data Tabel
LazyColumn {
items(mataKuliahList) { mataKuliah ->
Row(
modifier = Modifier
.fillMaxWidth()
.padding(8.dp),
verticalAlignment = Alignment.CenterVertically
) {
Text(mataKuliah.no.toString(), modifier = Modifier.weight(0.1f))
Text(mataKuliah.namaMK, modifier = Modifier.weight(0.4f))
Text(mataKuliah.sem.toString(), modifier = Modifier.weight(0.1f))
Text(mataKuliah.sks.toString(), modifier = Modifier.weight(0.1f))
}
}
}
}
}