diff --git a/changelog.md b/changelog.md index 17cc45108..1d12ca51e 100644 --- a/changelog.md +++ b/changelog.md @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - \[Demo\] Fix list item trailing icon vocalization and display ([#337](https://github.com/Orange-OpenSource/ods-android/issues/337)) - \[Demo\] Fix a bug where dark mode did not work properly in about screens on Android 13 ([#375](https://github.com/Orange-OpenSource/ods-android/issues/375)) - \[Lib\] Fix top app bar overflow menu colors ([#349](https://github.com/Orange-OpenSource/ods-android/issues/349)) +- \[Lib\] `OdsSmallCard` title is now single line and truncated if needed ([#302](https://github.com/Orange-OpenSource/ods-android/issues/302)) ## [0.8.0](https://github.com/Orange-OpenSource/ods-android/compare/0.7.0...0.8.0) - 2022-12-07 diff --git a/lib/src/main/java/com/orange/ods/compose/component/card/OdsSmallCard.kt b/lib/src/main/java/com/orange/ods/compose/component/card/OdsSmallCard.kt index c2370d5dd..6f788f816 100644 --- a/lib/src/main/java/com/orange/ods/compose/component/card/OdsSmallCard.kt +++ b/lib/src/main/java/com/orange/ods/compose/component/card/OdsSmallCard.kt @@ -27,6 +27,7 @@ import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.res.dimensionResource import androidx.compose.ui.res.painterResource import androidx.compose.ui.semantics.semantics +import androidx.compose.ui.text.style.TextOverflow import com.orange.ods.R import com.orange.ods.compose.component.OdsComponentApi import com.orange.ods.compose.component.utilities.Preview @@ -87,7 +88,9 @@ fun OdsSmallCard( ) { Text( text = title, - style = OdsTheme.typography.h6 + style = OdsTheme.typography.h6, + maxLines = 1, + overflow = TextOverflow.Ellipsis ) subtitle?.let { Text(