Created
June 15, 2024 08:26
-
-
Save alibahaaa/fe96a1bd326dbb24502a0606473f36e0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ir.baha.km_lib | |
import android.os.Bundle | |
import androidx.activity.ComponentActivity | |
import androidx.activity.compose.setContent | |
import androidx.activity.enableEdgeToEdge | |
import androidx.compose.foundation.layout.Box | |
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.ui.Alignment | |
import androidx.compose.ui.Modifier | |
import ir.baha.km.Greeting | |
import ir.baha.km_lib.ui.theme.KmlibTheme | |
class MainActivity : ComponentActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
enableEdgeToEdge() | |
setContent { | |
KmlibTheme { | |
Scaffold( | |
modifier = Modifier.fillMaxSize() | |
) { innerPadding -> | |
Box( | |
modifier = Modifier | |
.fillMaxSize() | |
.padding(innerPadding), | |
contentAlignment = Alignment.Center | |
) { | |
Text( | |
text = Greeting().greet(), | |
modifier = Modifier.padding(innerPadding) | |
) | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment