title: How to show ellipsis (three dots) at the end of a Text line in Android Jetpack Compose?
body: <p>Whether I use <a href="https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/package-summary#basictext" rel="noreferrer">androidx.compose.foundation.text.BasicText</a> or <a href="https://developer.android.com/reference/kotlin/androidx/compose/material/package-summary#text" rel="noreferrer">androidx.compose.material.Text</a>, if there isn't enough space for a text it wraps to the next line, for example:</p>
  <pre class="lang-kotlin prettyprint-override"><code>@Composable
  fun EllipsisExample() {
      Box(modifier = Modifier.width(160.dp)) {
          Text(&quot;Lorem ipsum dolor sit amet.&quot;)
      }
  }
  </code></pre>
  <p>renders:</p>
  <p><a href="https://i.stack.imgur.com/ymjnJ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ymjnJ.png" alt="enter image description here" /></a></p>
  <p>How could I force it to be a single line and draw ellipsis at the end of it? The result I want in this case is something like:</p>
  <blockquote>
  <p>Lorem ipsum dolor s…</p>
  </blockquote>