commit d410dee9e7d00c2dcaa0a3ed6534f251a70a9fc7 Author: 202310715176 HAGA DALPINTO GINTING <202310715176@mhs.ubharajaya.ac.id> Date: Thu Sep 25 08:17:09 2025 +0700 Upload files to "/" diff --git a/MainActivity.kt b/MainActivity.kt new file mode 100644 index 0000000..1a25721 --- /dev/null +++ b/MainActivity.kt @@ -0,0 +1,47 @@ +package com.example.helloword + +import android.os.Bundle +import androidx.activity.ComponentActivity +import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.padding +import androidx.compose.material3.Scaffold +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +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) + enableEdgeToEdge() + setContent { + HellowordTheme { + Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding -> + Greeting( + name = "Haga Dalpinto Ginting", + modifier = Modifier.padding(innerPadding) + ) + } + } + } + } +} + +@Composable +fun Greeting(name: String, modifier: Modifier = Modifier) { + Text( + text = "Hello $name!", + modifier = modifier + ) +} + +@Preview(showBackground = true) +@Composable +fun GreetingPreview() { + HellowordTheme { + Greeting("hellow") + } +} \ No newline at end of file