Skip to content

Commit

Permalink
Make marquee text maintain talkback focus during marquee animation. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
clickxu authored Mar 19, 2024
1 parent bd38658 commit 4fc8f9a
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.CompositingStrategy
import androidx.compose.ui.graphics.graphicsLayer
import androidx.compose.ui.layout.layout
import androidx.compose.ui.semantics.focused
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.style.TextAlign
Expand Down Expand Up @@ -100,6 +102,7 @@ public fun MarqueeText(
inlineContent = inlineContent,
modifier = modifier
.then(controller.outsideMarqueeModifier)
.semantics { focused = true }
.basicMarquee(
iterations = Int.MAX_VALUE,
delayMillis = pauseTime.inWholeMilliseconds.toInt(),
Expand Down

0 comments on commit 4fc8f9a

Please sign in to comment.