import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
@Composable
fun SimpleTextScreen() {
Box(
modifier = Modifier.fillMaxSize(),
contentAlignment = Alignment.Center
) {
Text(
text = "Hello, Compose!",
fontSize = 24.sp,
modifier = Modifier.padding(16.dp)
)
}
}We use a Box to fill the whole screen and center its content both horizontally and vertically using contentAlignment = Alignment.Center. Inside the Box, we add a Text composable with the string "Hello, Compose!". We set the font size to 24sp for clear visibility and add 16dp padding around the text to keep some space from edges. This creates a simple centered text screen using Jetpack Compose.