How to use string resources in Android Jetpack Compose?
There’s androidx.compose.ui.res package containing functions for loading string resources as well as other resource types. string You can get a string using stringResource() function, for example: … import androidx.compose.ui.res.stringResource @Composable fun StringResourceExample() { Text( // a string without arguments text = stringResource(R.string.app_name) ) Text( // a string with arguments text = stringResource(R.string.greeting, “World”) ) } … Read more