fun MarqueeText(text: String, modifier: Modifier = Modifier, textModifier: Modifier = Modifier, gradientEdgeColor: Color = Color.White, color: Color = Color.Unspecified, fontSize: TextUnit = TextUnit.Unspecified, fontStyle: FontStyle? = null, fontWeight: FontWeight? = null, fontFamily: FontFamily? = null, letterSpacing: TextUnit = TextUnit.Unspecified, textDecoration: TextDecoration? = null, textAlign: TextAlign? = null, lineHeight: TextUnit = TextUnit.Unspecified, overflow: TextOverflow = TextOverflow.Clip, softWrap: Boolean = true, onTextLayout: (TextLayoutResult) -> Unit = {}, style: TextStyle = LocalTextStyle.current) Author: @Jeluchu
Auto scrollable text to display the content that is over passed to the view (This design element is estimated to be temporary until the Jetpack Compose team releases an official solution for this behavior that exists in XML)
Parameters
modifier that will be used to change the color, size...
Color to apply to the text
the typeface variant to use when drawing the letters (e.g., italic)
the typeface thickness to use when painting the text (e.g., FontWeight.Bold)
the amount of space to add between each letter.
how visual overflow should be handled.
whether the text should break at soft line breaks
callback that is executed when a new text layout is calculated A TextLayoutResult object that callback provides contains paragraph information, size of the text, baselines and other details. The callback can be used to add additional decoration or functionality to the text
style configuration for the text such as color, font, line height etc.
fun MarqueeText(text: String, modifier: Modifier = Modifier, color: Color = Color.Unspecified, fontSize: TextUnit = TextUnit.Unspecified, fontStyle: FontStyle? = null, fontWeight: FontWeight? = null, fontFamily: FontFamily? = null, letterSpacing: TextUnit = TextUnit.Unspecified, textDecoration: TextDecoration? = null, textAlign: TextAlign? = TextAlign.Center, lineHeight: TextUnit = TextUnit.Unspecified, overflow: TextOverflow = TextOverflow.Clip, softWrap: Boolean = true, iterations: Int = Int.MAX_VALUE, edgeWidthGradient: Dp = 10.dp, marqueeSpacing: MarqueeSpacing = MarqueeSpacing(30.dp), delayMillis: Int = DefaultMarqueeDelayMillis, animationMode: MarqueeAnimationMode = MarqueeAnimationMode.Immediately, velocity: Dp = DefaultMarqueeVelocity, maxLines: Int = Int.MAX_VALUE, onTextLayout: (TextLayoutResult) -> Unit = {}, style: TextStyle = LocalTextStyle.current) fun MarqueeText(@StringRes text: Int, modifier: Modifier = Modifier, color: Color = Color.Unspecified, fontSize: TextUnit = TextUnit.Unspecified, fontStyle: FontStyle? = null, fontWeight: FontWeight? = null, fontFamily: FontFamily? = null, letterSpacing: TextUnit = TextUnit.Unspecified, textDecoration: TextDecoration? = null, textAlign: TextAlign? = TextAlign.Center, lineHeight: TextUnit = TextUnit.Unspecified, overflow: TextOverflow = TextOverflow.Clip, softWrap: Boolean = true, iterations: Int = Int.MAX_VALUE, edgeWidthGradient: Dp = 10.dp, marqueeSpacing: MarqueeSpacing = MarqueeSpacing(30.dp), delayMillis: Int = DefaultMarqueeDelayMillis, animationMode: MarqueeAnimationMode = MarqueeAnimationMode.Immediately, velocity: Dp = DefaultMarqueeVelocity, maxLines: Int = Int.MAX_VALUE, onTextLayout: (TextLayoutResult) -> Unit = {}, style: TextStyle = LocalTextStyle.current)