RemoteBasicText

Functions summary

Unit
@Composable
@RemoteComposable
RemoteBasicText(
    text: RemoteString,
    modifier: RemoteModifier,
    color: RemoteColor?,
    fontSize: RemoteTextUnit?,
    fontStyle: FontStyle?,
    fontWeight: FontWeight?,
    fontFamily: RemoteFontFamily?,
    textAlign: TextAlign?,
    overflow: TextOverflow,
    maxLines: Int,
    style: RemoteTextStyle,
    fontVariationSettings: FontVariation.Settings?
)

Remote composable that displays basic text.

Functions

@Composable
@RemoteComposable
fun RemoteBasicText(
    text: RemoteString,
    modifier: RemoteModifier = RemoteModifier,
    color: RemoteColor? = null,
    fontSize: RemoteTextUnit? = null,
    fontStyle: FontStyle? = null,
    fontWeight: FontWeight? = null,
    fontFamily: RemoteFontFamily? = null,
    textAlign: TextAlign? = null,
    overflow: TextOverflow = TextOverflow.Clip,
    maxLines: Int = Int.MAX_VALUE,
    style: RemoteTextStyle = RemoteTextStyle.Default,
    fontVariationSettings: FontVariation.Settings? = null
): Unit

Remote composable that displays basic text.

import androidx.compose.remote.creation.compose.state.rc
import androidx.compose.remote.creation.compose.state.rs
import androidx.compose.remote.creation.compose.state.rsp
import androidx.compose.remote.foundation.text.RemoteBasicText
import androidx.compose.ui.graphics.Color

RemoteBasicText(text = "Hello Remote Compose".rs, color = Color.Black.rc, fontSize = 16.rsp)
import androidx.compose.remote.creation.compose.layout.RemoteColumn
import androidx.compose.remote.creation.compose.state.rc
import androidx.compose.remote.creation.compose.state.rs
import androidx.compose.remote.creation.compose.state.rsp
import androidx.compose.remote.foundation.text.RemoteBasicText
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.text.font.FontWeight

RemoteColumn {
    RemoteBasicText(
        text = "Bold Text".rs,
        color = Color.Black.rc,
        fontSize = 18.rsp,
        fontWeight = FontWeight.Bold,
    )
    RemoteBasicText(
        text = "Italic Text".rs,
        color = Color.Gray.rc,
        fontSize = 14.rsp,
        fontStyle = FontStyle.Italic,
    )
}
import androidx.compose.remote.creation.compose.state.rc
import androidx.compose.remote.creation.compose.state.rs
import androidx.compose.remote.creation.compose.state.rsp
import androidx.compose.remote.creation.compose.text.RemoteFontFamily
import androidx.compose.remote.foundation.text.RemoteBasicText
import androidx.compose.ui.graphics.Color

RemoteBasicText(
    text = "Monospace Font".rs,
    color = Color.Black.rc,
    fontSize = 16.rsp,
    fontFamily = RemoteFontFamily.Monospace,
)
Parameters
text: RemoteString

The text to be displayed.

modifier: RemoteModifier = RemoteModifier

The RemoteModifier to be applied to this text.

color: RemoteColor? = null

RemoteColor to apply to the text. If color is not specified, and it is not provided in style, then androidx.compose.ui.graphics.Color.Black will be used.

fontSize: RemoteTextUnit? = null

The size of the font.

fontStyle: FontStyle? = null

The font style to be applied to the text.

fontWeight: FontWeight? = null

The font weight to be applied to the text.

fontFamily: RemoteFontFamily? = null

The font family to be applied to the text.

textAlign: TextAlign? = null

The alignment of the text within its container.

overflow: TextOverflow = TextOverflow.Clip

How visual overflow should be handled.

maxLines: Int = Int.MAX_VALUE

An optional maximum number of lines for the text.

style: RemoteTextStyle = RemoteTextStyle.Default

The RemoteTextStyle to be applied to the text.

fontVariationSettings: FontVariation.Settings? = null

The font variation settings to be applied to the text.