commit 1ea080fcbab3be61f6b64c49c66a61cbe9284427 Author: 202310715130 DWI FEBRYANTI <202310715130@mhs.ubharajaya.ac.id> Date: Wed Nov 5 19:47:10 2025 +0700 Upload Tugas Helloword diff --git a/Helloword/MainActivity.kt b/Helloword/MainActivity.kt new file mode 100644 index 0000000..19a8336 --- /dev/null +++ b/Helloword/MainActivity.kt @@ -0,0 +1,49 @@ +package com.example.helloword + +import android.os.Bundle +import androidx.activity.ComponentActivity +import androidx.activity.compose.setContent +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.tooling.preview.Preview +import com.example.helloword.ui.theme.HellowordTheme + +class MainActivity : ComponentActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContent { + HellowordTheme { + Surface( + modifier = Modifier.fillMaxSize(), + color = MaterialTheme.colorScheme.background + ) { + HelloWorldScreen() + } + } + } + } +} + +@Composable +fun HelloWorldScreen() { + Box( + modifier = Modifier.fillMaxSize(), + contentAlignment = Alignment.Center + ) { + Text(text = "Hello World!") + } +} + +@Preview(showBackground = true) +@Composable +fun PreviewHelloWorld() { + HellowordTheme { + HelloWorldScreen() + } +} diff --git a/Helloword/Screenshot 2025-11-05 194646.png b/Helloword/Screenshot 2025-11-05 194646.png new file mode 100644 index 0000000..9bae83b Binary files /dev/null and b/Helloword/Screenshot 2025-11-05 194646.png differ