Composable Function

stringResource

Load a string resource.

stringResource

Source set: Android
@Composable
public fun stringResource(@StringRes id: Int): String

Load a string resource.

Parameters

id the resource identifier

Return

the string data associated with the resource

stringResource

Source set: Android
@Composable
public fun stringResource(@StringRes id: Int, vararg formatArgs: Any): String

Load a string resource with formatting.

Parameters

id the resource identifier
formatArgs the format arguments

Return

the string data associated with the resource

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: